E2E tests fix concurrent access to env var
@@ -23,6 +23,7 @@ var _ = Describe("Image Scan", func() {
BeforeEach(func() {
k = env.Kubectl.Namespace(env.Namespace)
gh = githelper.New()
+ gh.Branch = "imagescan"
out, err := k.Create(
"secret", "generic", "git-auth", "--type", "kubernetes.io/ssh-auth",
@@ -32,8 +33,6 @@ var _ = Describe("Image Scan", func() {
)
Expect(err).ToNot(HaveOccurred(), out)
- os.Setenv("GIT_REPO_BRANCH", "imagescan")
-
tmpdir, _ = os.MkdirTemp("", "fleet-")
repodir = path.Join(tmpdir, "repo")
_, err = gh.Create(repodir, testenv.AssetPath("imagescan/repo"), "examples")
