Skip to content

Commit

Permalink
Fixed unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
satr committed Sep 18, 2024
1 parent 6ceb29c commit 1ef2aa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pipeline-runner/internal/jobs/build/acr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func assertACRJobSpec(t *testing.T, pushImage bool) {
assert.ElementsMatch(t, []string{"internal-nslookup", "clone", "internal-chmod"}, slice.Map(job.Spec.Template.Spec.InitContainers, func(c corev1.Container) string { return c.Name }))
cloneContainer, _ := slice.FindFirst(job.Spec.Template.Spec.InitContainers, func(c corev1.Container) bool { return c.Name == "clone" })
assert.Equal(t, args.GitCloneGitImage, cloneContainer.Image)
assert.Equal(t, []string{"sh", "-c", "git config --global --add safe.directory /workspace && git clone --recurse-submodules anycloneurl -b anybranch --verbose --progress /workspace && cd /workspace && if [ -n $(git lfs ls-files 2>/dev/null) ]; then git lfs install && echo 'Pulling large files...' && git lfs pull && echo 'Done'; fi"}, cloneContainer.Command)
assert.Equal(t, []string{"sh", "-c", "git config --global --add safe.directory /workspace && git clone --recurse-submodules anycloneurl -b anybranch --verbose --progress /workspace && cd /workspace && if [ -n \"$(git lfs ls-files 2>/dev/null)\" ]; then git lfs install && echo 'Pulling large files...' && git lfs pull && echo 'Done'; fi"}, cloneContainer.Command)
assert.Empty(t, cloneContainer.Args)
expectedCloneVolumeMounts := []corev1.VolumeMount{
{Name: git.BuildContextVolumeName, MountPath: git.Workspace},
Expand Down
2 changes: 1 addition & 1 deletion pipeline-runner/internal/jobs/build/buildkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func assertBuildKitJobSpec(t *testing.T, useCache, pushImage bool, buildSecrets
assert.ElementsMatch(t, []string{"internal-nslookup", "clone", "internal-chmod"}, slice.Map(job.Spec.Template.Spec.InitContainers, func(c corev1.Container) string { return c.Name }))
cloneContainer, _ := slice.FindFirst(job.Spec.Template.Spec.InitContainers, func(c corev1.Container) bool { return c.Name == "clone" })
assert.Equal(t, args.GitCloneGitImage, cloneContainer.Image)
assert.Equal(t, []string{"sh", "-c", "git config --global --add safe.directory /workspace && git clone --recurse-submodules anycloneurl -b anybranch --verbose --progress /workspace && cd /workspace && if [ -n $(git lfs ls-files 2>/dev/null) ]; then git lfs install && echo 'Pulling large files...' && git lfs pull && echo 'Done'; fi"},
assert.Equal(t, []string{"sh", "-c", "git config --global --add safe.directory /workspace && git clone --recurse-submodules anycloneurl -b anybranch --verbose --progress /workspace && cd /workspace && if [ -n \"$(git lfs ls-files 2>/dev/null)\" ]; then git lfs install && echo 'Pulling large files...' && git lfs pull && echo 'Done'; fi"},
cloneContainer.Command)
assert.Empty(t, cloneContainer.Args)
expectedCloneVolumeMounts := []corev1.VolumeMount{
Expand Down

0 comments on commit 1ef2aa0

Please sign in to comment.