diff --git a/pipeline-runner/internal/jobs/build/acr_test.go b/pipeline-runner/internal/jobs/build/acr_test.go index 1cfa367c4..e069ce97f 100644 --- a/pipeline-runner/internal/jobs/build/acr_test.go +++ b/pipeline-runner/internal/jobs/build/acr_test.go @@ -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}, diff --git a/pipeline-runner/internal/jobs/build/buildkit_test.go b/pipeline-runner/internal/jobs/build/buildkit_test.go index bf9974c2f..0300a0023 100644 --- a/pipeline-runner/internal/jobs/build/buildkit_test.go +++ b/pipeline-runner/internal/jobs/build/buildkit_test.go @@ -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{