From 8dc6eabbc02ef07c76671d53f28baf46871d5b68 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 22 Apr 2023 20:53:00 +0200 Subject: Update go tool dependencies, restructure lint targets (#24239) - Update all tool dependencies to latest tag - Remove unused errcheck, it is part of golangci-lint - Include main.go in air - Enable wastedassign again now that it's [generics-compatible](https://github.com/golangci/golangci-lint/pull/3689) - Restructured lint targets to new `lint-*` namespace --- tests/integration/api_packages_pub_test.go | 2 +- tests/integration/api_repo_test.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/integration/api_packages_pub_test.go b/tests/integration/api_packages_pub_test.go index 24975ab621..4d4ce12402 100644 --- a/tests/integration/api_packages_pub_test.go +++ b/tests/integration/api_packages_pub_test.go @@ -120,7 +120,7 @@ description: ` + packageDescription assert.NoError(t, err) assert.Equal(t, int64(len(content)), pb.Size) - resp = uploadFile(t, result.URL, content, http.StatusBadRequest) + _ = uploadFile(t, result.URL, content, http.StatusBadRequest) }) t.Run("Download", func(t *testing.T) { diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go index b3a184eddd..ecaa9fe986 100644 --- a/tests/integration/api_repo_test.go +++ b/tests/integration/api_repo_test.go @@ -183,18 +183,17 @@ func TestAPISearchRepo(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { for userToLogin, expected := range testCase.expectedResults { - var session *TestSession var testName string var userID int64 var token string if userToLogin != nil && userToLogin.ID > 0 { testName = fmt.Sprintf("LoggedUser%d", userToLogin.ID) - session = loginUser(t, userToLogin.Name) + session := loginUser(t, userToLogin.Name) token = getTokenForLoggedInUser(t, session) userID = userToLogin.ID } else { testName = "AnonymousUser" - session = emptyTestSession(t) + _ = emptyTestSession(t) } t.Run(testName, func(t *testing.T) { -- cgit v1.2.3