@@ -33,10 +33,10 @@ func TestDefaultGitClient_Clone_Errors(t *testing.T) {
3333 config CloneConfig
3434 }{
3535 {name : "invalid URL" , config : CloneConfig {URL : "invalid-url" }},
36- {name : "conflicting branch and tag" , config : CloneConfig {URL : testRepoURL , Branch : "main" , Tag : "v1.0" }},
37- {name : "conflicting branch and commit" , config : CloneConfig {URL : testRepoURL , Branch : "main" , Commit : testCommitHash }},
36+ {name : "conflicting branch and tag" , config : CloneConfig {URL : testRepoURL , Branch : mainBranchName , Tag : "v1.0" }},
37+ {name : "conflicting branch and commit" , config : CloneConfig {URL : testRepoURL , Branch : mainBranchName , Commit : testCommitHash }},
3838 {name : "conflicting tag and commit" , config : CloneConfig {URL : testRepoURL , Tag : "v1.0" , Commit : testCommitHash }},
39- {name : "all three refs set" , config : CloneConfig {URL : testRepoURL , Branch : "main" , Tag : "v1.0" , Commit : testCommitHash }},
39+ {name : "all three refs set" , config : CloneConfig {URL : testRepoURL , Branch : mainBranchName , Tag : "v1.0" , Commit : testCommitHash }},
4040 }
4141
4242 for _ , tt := range tests {
@@ -171,13 +171,13 @@ func TestCloneConfig_Validate(t *testing.T) {
171171 wantErr bool
172172 }{
173173 {name : "URL only" , config : CloneConfig {URL : testRepoURL }, wantErr : false },
174- {name : "branch only" , config : CloneConfig {URL : "u" , Branch : "main" }, wantErr : false },
174+ {name : "branch only" , config : CloneConfig {URL : "u" , Branch : mainBranchName }, wantErr : false },
175175 {name : "tag only" , config : CloneConfig {URL : "u" , Tag : "v1" }, wantErr : false },
176176 {name : "commit only" , config : CloneConfig {URL : "u" , Commit : testShortHash }, wantErr : false },
177- {name : "branch+tag" , config : CloneConfig {URL : "u" , Branch : "main" , Tag : "v1" }, wantErr : true },
178- {name : "branch+commit" , config : CloneConfig {URL : "u" , Branch : "main" , Commit : testShortHash }, wantErr : true },
177+ {name : "branch+tag" , config : CloneConfig {URL : "u" , Branch : mainBranchName , Tag : "v1" }, wantErr : true },
178+ {name : "branch+commit" , config : CloneConfig {URL : "u" , Branch : mainBranchName , Commit : testShortHash }, wantErr : true },
179179 {name : "tag+commit" , config : CloneConfig {URL : "u" , Tag : "v1" , Commit : testShortHash }, wantErr : true },
180- {name : "all three" , config : CloneConfig {URL : "u" , Branch : "main" , Tag : "v1" , Commit : testShortHash }, wantErr : true },
180+ {name : "all three" , config : CloneConfig {URL : "u" , Branch : mainBranchName , Tag : "v1" , Commit : testShortHash }, wantErr : true },
181181 }
182182
183183 for _ , tt := range tests {
0 commit comments