Update minimum go version to 1.26.1, golangci-lint to 2.11.2, fix test style (#36876)
Hey, I bumped Go to 1.26.1 and fixed a couple of things I ran into while poking around. ### Changes - Bump go.mod from 1.26.0 to 1.26.1 (security patch) - Bump golangci-lint from v2.10.1 to v2.11.2 - Run make tidy, fmt, lint-go --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
This commit is contained in:
@@ -502,11 +502,12 @@ func runTestCase(t *testing.T, testCase *requiredScopeTestCase, user *user_model
|
||||
}
|
||||
unauthorizedLevel := auth_model.Write
|
||||
if categoryIsRequired {
|
||||
if minRequiredLevel == auth_model.Read {
|
||||
switch minRequiredLevel {
|
||||
case auth_model.Read:
|
||||
unauthorizedLevel = auth_model.NoAccess
|
||||
} else if minRequiredLevel == auth_model.Write {
|
||||
case auth_model.Write:
|
||||
unauthorizedLevel = auth_model.Read
|
||||
} else {
|
||||
default:
|
||||
assert.FailNow(t, "Invalid test case", "Unknown access token scope level: %v", minRequiredLevel)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user