mirror of
https://github.com/distribution/distribution
synced 2025-02-23 06:49:36 +01:00
Merge pull request #3128 from dmcgowan/gosimple-fix
Fix gosimple checks
This commit is contained in:
commit
17a394f9af
@ -466,7 +466,7 @@ func TestEndpointAuthorizeTokenBasic(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
authenicate1 := fmt.Sprintf("Basic realm=localhost")
|
authenicate1 := "Basic realm=localhost"
|
||||||
basicCheck := func(a string) bool {
|
basicCheck := func(a string) bool {
|
||||||
return a == fmt.Sprintf("Basic %s", basicAuth(username, password))
|
return a == fmt.Sprintf("Basic %s", basicAuth(username, password))
|
||||||
}
|
}
|
||||||
@ -546,7 +546,7 @@ func TestEndpointAuthorizeTokenBasicWithExpiresIn(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
authenicate1 := fmt.Sprintf("Basic realm=localhost")
|
authenicate1 := "Basic realm=localhost"
|
||||||
tokenExchanges := 0
|
tokenExchanges := 0
|
||||||
basicCheck := func(a string) bool {
|
basicCheck := func(a string) bool {
|
||||||
tokenExchanges = tokenExchanges + 1
|
tokenExchanges = tokenExchanges + 1
|
||||||
@ -706,7 +706,7 @@ func TestEndpointAuthorizeTokenBasicWithExpiresInAndIssuedAt(t *testing.T) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
authenicate1 := fmt.Sprintf("Basic realm=localhost")
|
authenicate1 := "Basic realm=localhost"
|
||||||
tokenExchanges := 0
|
tokenExchanges := 0
|
||||||
basicCheck := func(a string) bool {
|
basicCheck := func(a string) bool {
|
||||||
tokenExchanges = tokenExchanges + 1
|
tokenExchanges = tokenExchanges + 1
|
||||||
@ -835,7 +835,7 @@ func TestEndpointAuthorizeBasic(t *testing.T) {
|
|||||||
|
|
||||||
username := "user1"
|
username := "user1"
|
||||||
password := "funSecretPa$$word"
|
password := "funSecretPa$$word"
|
||||||
authenicate := fmt.Sprintf("Basic realm=localhost")
|
authenicate := "Basic realm=localhost"
|
||||||
validCheck := func(a string) bool {
|
validCheck := func(a string) bool {
|
||||||
return a == fmt.Sprintf("Basic %s", basicAuth(username, password))
|
return a == fmt.Sprintf("Basic %s", basicAuth(username, password))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user