fix linter failures
This commit is contained in:
parent
852c03a49b
commit
105ec3d48f
@ -239,9 +239,7 @@ func TestServiceAccountTokenCreate(t *testing.T) {
|
||||
info := doTokenReview(t, cs, treq, false)
|
||||
// we are not testing the credential-id feature, so delete this value from the returned extra info map
|
||||
if info.Extra != nil {
|
||||
if _, ok := info.Extra[apiserverserviceaccount.CredentialIDKey]; ok {
|
||||
delete(info.Extra, apiserverserviceaccount.CredentialIDKey)
|
||||
}
|
||||
delete(info.Extra, apiserverserviceaccount.CredentialIDKey)
|
||||
}
|
||||
if len(info.Extra) > 0 {
|
||||
t.Fatalf("expected Extra to be empty but got: %#v", info.Extra)
|
||||
@ -313,9 +311,7 @@ func TestServiceAccountTokenCreate(t *testing.T) {
|
||||
|
||||
info := doTokenReview(t, cs, treq, false)
|
||||
// we are not testing the credential-id feature, so delete this value from the returned extra info map
|
||||
if _, ok := info.Extra[apiserverserviceaccount.CredentialIDKey]; ok {
|
||||
delete(info.Extra, apiserverserviceaccount.CredentialIDKey)
|
||||
}
|
||||
delete(info.Extra, apiserverserviceaccount.CredentialIDKey)
|
||||
if len(info.Extra) != 2 {
|
||||
t.Fatalf("expected Extra have length of 2 but was length %d: %#v", len(info.Extra), info.Extra)
|
||||
}
|
||||
@ -411,9 +407,7 @@ func TestServiceAccountTokenCreate(t *testing.T) {
|
||||
|
||||
info := doTokenReview(t, cs, treq, false)
|
||||
// we are not testing the credential-id feature, so delete this value from the returned extra info map
|
||||
if _, ok := info.Extra[apiserverserviceaccount.CredentialIDKey]; ok {
|
||||
delete(info.Extra, apiserverserviceaccount.CredentialIDKey)
|
||||
}
|
||||
delete(info.Extra, apiserverserviceaccount.CredentialIDKey)
|
||||
if len(info.Extra) != len(expectedExtraValues) {
|
||||
t.Fatalf("expected Extra have length of %d but was length %d: %#v", len(expectedExtraValues), len(info.Extra), info.Extra)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user