[release-12.0.2] Chore: Address linting issues to unblock CI (#106610)

Chore: Address linting issues to unblock CI
This commit is contained in:
Matheus Macabu
2025-06-12 16:01:28 +02:00
committed by GitHub
parent 6cb121d4e8
commit 25b41aabd5
7 changed files with 16 additions and 2 deletions
+5 -2
View File
@@ -24,7 +24,10 @@ func TestStatic(t *testing.T) {
// Create a temporary directory for test files
tmpDir, err := os.MkdirTemp("", "static-test")
require.NoError(t, err)
defer os.RemoveAll(tmpDir)
defer func() {
err := os.RemoveAll(tmpDir)
require.NoError(t, err)
}()
// Create test files
testFiles := map[string]string{
@@ -34,7 +37,7 @@ func TestStatic(t *testing.T) {
for path, content := range testFiles {
fullPath := filepath.Join(tmpDir, path)
err := os.MkdirAll(filepath.Dir(fullPath), 0o755)
err := os.MkdirAll(filepath.Dir(fullPath), 0o750)
require.NoError(t, err)
err = os.WriteFile(fullPath, []byte(content), 0o644)
require.NoError(t, err)
@@ -10,6 +10,8 @@ import (
"github.com/google/uuid"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
//nolint:staticcheck
"golang.org/x/exp/rand"
"github.com/grafana/grafana/pkg/services/featuremgmt"
@@ -7,6 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
//nolint:staticcheck
"golang.org/x/exp/rand"
"github.com/grafana/grafana/pkg/apimachinery/identity"
@@ -14,6 +14,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/maps"
//nolint:staticcheck
"golang.org/x/exp/rand"
"github.com/grafana/grafana/pkg/bus"
@@ -10,6 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
//nolint:staticcheck
"golang.org/x/exp/rand"
"github.com/grafana/grafana/pkg/services/folder"
@@ -7,6 +7,8 @@ import (
"github.com/bwmarrin/snowflake"
"github.com/stretchr/testify/require"
//nolint:staticcheck
"golang.org/x/exp/rand"
"k8s.io/apimachinery/pkg/api/apitesting"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+1
View File
@@ -16,6 +16,7 @@ import (
"strconv"
"time"
//nolint:staticcheck
"golang.org/x/exp/rand"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"