Skip to content

Commit

Permalink
update initcontainer test
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsgstrabo committed Jun 10, 2024
1 parent e7d6256 commit dbb3f69
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pipeline-runner/steps/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ func (s *buildTestSuite) Test_BuildDeploy_JobSpecAndDeploymentConsistent() {
s.Equal(expectedAffinity, job.Spec.Template.Spec.Affinity)

// Check init containers
s.Len(job.Spec.Template.Spec.InitContainers, 2)
s.ElementsMatch([]string{"internal-nslookup", "clone"}, slice.Map(job.Spec.Template.Spec.InitContainers, func(c corev1.Container) string { return c.Name }))
s.ElementsMatch([]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" })
s.Equal("alpine/git:2.45.1", cloneContainer.Image)
s.Equal([]string{"git", "clone", "--recurse-submodules", cloneURL, "-b", buildBranch, "--verbose", "--progress", git.Workspace}, cloneContainer.Command)
Expand Down

0 comments on commit dbb3f69

Please sign in to comment.