Chore: Enable scopelint Go linter (#25896)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -42,6 +42,7 @@ func TestGetHomeDashboard(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
dash := dtos.DashboardFullWithMeta{}
|
||||
dash.Meta.IsHome = true
|
||||
@@ -801,6 +802,7 @@ func TestDashboardApiEndpoint(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
mock := &dashboards.FakeDashboardService{
|
||||
SaveDashboardError: tc.SaveError,
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ func TestFoldersApiEndpoint(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
mock := &fakeFolderService{
|
||||
CreateFolderError: tc.Error,
|
||||
}
|
||||
@@ -119,6 +120,7 @@ func TestFoldersApiEndpoint(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
mock := &fakeFolderService{
|
||||
UpdateFolderError: tc.Error,
|
||||
}
|
||||
|
||||
@@ -252,6 +252,7 @@ func TestLoginViewRedirect(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range redirectCases {
|
||||
c := c
|
||||
hs.Cfg.AppUrl = c.appURL
|
||||
hs.Cfg.AppSubUrl = c.appSubURL
|
||||
t.Run(c.desc, func(t *testing.T) {
|
||||
@@ -420,6 +421,7 @@ func TestLoginPostRedirect(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, c := range redirectCases {
|
||||
c := c
|
||||
hs.Cfg.AppUrl = c.appURL
|
||||
hs.Cfg.AppSubUrl = c.appSubURL
|
||||
t.Run(c.desc, func(t *testing.T) {
|
||||
|
||||
@@ -189,6 +189,7 @@ func TestAccessToken(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, testCase := range testCases {
|
||||
testCase := testCase
|
||||
Convey(testCase.desc, func() {
|
||||
clearTokenCache()
|
||||
// reset the httphandler counter
|
||||
|
||||
@@ -617,6 +617,7 @@ func TestNewDataSourceProxy_MSSQL(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range tcs {
|
||||
tc := tc
|
||||
t.Run(tc.description, func(t *testing.T) {
|
||||
cfg := setting.Cfg{}
|
||||
plugin := plugins.DataSourcePlugin{}
|
||||
|
||||
Reference in New Issue
Block a user