Skip to content

Commit

Permalink
UPSTREAM: <carry>: fix [sig-auth] ServiceAccounts no secret-based ser…
Browse files Browse the repository at this point in the history
…vice account token should be auto-generated

OpenShift-Rebase-Source: a031438

UPSTREAM: <carry>: fix [sig-auth] ServiceAccounts no secret-based service account token should be auto-generated
  • Loading branch information
tkashem authored and soltysh committed Jul 1, 2024
1 parent 569c495 commit 920eb85
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/e2e/auth/service_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ var _ = SIGDescribe("ServiceAccounts", func() {
time.Sleep(10 * time.Second)
sa, err := f.ClientSet.CoreV1().ServiceAccounts(f.Namespace.Name).Get(ctx, "default", metav1.GetOptions{})
framework.ExpectNoError(err)

// TODO: Ignore the image pull secret that OpenShift sometimes creates and adds to the list of Secrets.
// TODO: This patch can be removed once OpenShift stops adding the pull secret to the list of secrets in 4.16.
secrets := sa.DeepCopy().Secrets
sa.Secrets = nil
for _, s := range secrets {
if strings.HasPrefix(s.Name, "default-dockercfg") {
continue
}
sa.Secrets = append(sa.Secrets, s)
}
gomega.Expect(sa.Secrets).To(gomega.BeEmpty())
}
})
Expand Down

0 comments on commit 920eb85

Please sign in to comment.