Skip to content

Commit

Permalink
test: verify pod spec for kaniko.imagePullSecret
Browse files Browse the repository at this point in the history
  • Loading branch information
dherges committed Dec 21, 2024
1 parent 6f5fe9e commit ad28434
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/skaffold/build/cluster/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ func TestKanikoArgs(t *testing.T) {

func TestKanikoPodSpec(t *testing.T) {
artifact := &latest.KanikoArtifact{
Image: "image",
DockerfilePath: "Dockerfile",
InitImage: "init/image",
Image: "image",
DockerfilePath: "Dockerfile",
InitImage: "init/image",
ImagePullSecret: "image-pull-secret",
Destination: []string{
"gcr.io/foo/bar:test-1",
"gcr.io/foo/bar:test-2",
Expand Down Expand Up @@ -353,6 +354,9 @@ func TestKanikoPodSpec(t *testing.T) {
},
},
}},
ImagePullSecrets: []v1.LocalObjectReference{{
Name: "image-pull-secret",
}},
ServiceAccountName: "aVerySpecialSA",
SecurityContext: &v1.PodSecurityContext{
RunAsUser: &runAsUser,
Expand Down

0 comments on commit ad28434

Please sign in to comment.