Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): specify master as the initial git branch in e2e tests #15662

Merged
merged 6 commits into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/e2e/fixture/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ func EnsureCleanState(t *testing.T, opts ...TestOption) {
// set-up tmp repo, must have unique name
FailOnErr(Run("", "cp", "-Rf", opt.testdata, repoDirectory()))
FailOnErr(Run(repoDirectory(), "chmod", "777", "."))
FailOnErr(Run(repoDirectory(), "git", "init"))
FailOnErr(Run(repoDirectory(), "git", "init", "-b", "master"))
FailOnErr(Run(repoDirectory(), "git", "add", "."))
FailOnErr(Run(repoDirectory(), "git", "commit", "-q", "-m", "initial commit"))

Expand Down Expand Up @@ -876,7 +876,7 @@ func CreateSubmoduleRepos(repoType string) {
// set-up submodule repo
FailOnErr(Run("", "cp", "-Rf", "testdata/git-submodule/", submoduleDirectory()))
FailOnErr(Run(submoduleDirectory(), "chmod", "777", "."))
FailOnErr(Run(submoduleDirectory(), "git", "init"))
FailOnErr(Run(submoduleDirectory(), "git", "init", "-b", "master"))
FailOnErr(Run(submoduleDirectory(), "git", "add", "."))
FailOnErr(Run(submoduleDirectory(), "git", "commit", "-q", "-m", "initial commit"))

Expand All @@ -888,7 +888,7 @@ func CreateSubmoduleRepos(repoType string) {
// set-up submodule parent repo
FailOnErr(Run("", "mkdir", submoduleParentDirectory()))
FailOnErr(Run(submoduleParentDirectory(), "chmod", "777", "."))
FailOnErr(Run(submoduleParentDirectory(), "git", "init"))
FailOnErr(Run(submoduleParentDirectory(), "git", "init", "-b", "master"))
FailOnErr(Run(submoduleParentDirectory(), "git", "add", "."))
if IsRemote() {
FailOnErr(Run(submoduleParentDirectory(), "git", "submodule", "add", "-b", "master", os.Getenv("ARGOCD_E2E_GIT_SERVICE_SUBMODULE"), "submodule/test"))
Expand Down
Loading