Skip to content

Commit

Permalink
Fix GCI issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi committed Dec 4, 2020
1 parent c9feb56 commit d48faf2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/skaffold/schema/versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func TestParseConfigAndUpgrade(t *testing.T) {
expected: config(
withClusterBuild("some-secret", "/secret", "default", "", "20m",
withGitTagger(),
withKanikoArtifact("image1", "./examples/app1", "Dockerfile"),
withKanikoArtifact(),
withKanikoVolumeMount("docker-config", "/kaniko/.docker"),
withVolume(v1.Volume{
Name: "docker-config",
Expand Down Expand Up @@ -264,7 +264,7 @@ func TestParseConfigAndUpgrade(t *testing.T) {
expected: config(
withClusterBuild("", "/secret", "default", "", "20m",
withGitTagger(),
withKanikoArtifact("image1", "./examples/app1", "Dockerfile"),
withKanikoArtifact(),
),
withKubectlDeploy("k8s/*.yaml"),
withLogsPrefix("container"),
Expand All @@ -278,7 +278,7 @@ func TestParseConfigAndUpgrade(t *testing.T) {
withClusterBuild("secret-name", "/secret", "nskaniko", "/secret.json", "120m",
withGitTagger(),
withDockerConfig("config-name", "/kaniko/.docker"),
withKanikoArtifact("image1", "./examples/app1", "Dockerfile"),
withKanikoArtifact(),
),
withKubectlDeploy("k8s/*.yaml"),
withLogsPrefix("container"),
Expand Down Expand Up @@ -365,7 +365,7 @@ func TestMarshalConfig(t *testing.T) {
config: config(
withClusterBuild("some-secret", "/some/secret", "default", "", "20m",
withGitTagger(),
withKanikoArtifact("image1", "./examples/app1", "Dockerfile"),
withKanikoArtifact(),
withKanikoVolumeMount("docker-config", "/kaniko/.docker"),
withVolume(v1.Volume{
Name: "docker-config",
Expand Down Expand Up @@ -513,14 +513,14 @@ func withBazelArtifact(image, workspace, target string) func(*latest.BuildConfig
}
}

func withKanikoArtifact(image, workspace, dockerfile string) func(*latest.BuildConfig) {
func withKanikoArtifact() func(*latest.BuildConfig) {
return func(cfg *latest.BuildConfig) {
cfg.Artifacts = append(cfg.Artifacts, &latest.Artifact{
ImageName: image,
Workspace: workspace,
ImageName: "image1",
Workspace: "./examples/app1",
ArtifactType: latest.ArtifactType{
KanikoArtifact: &latest.KanikoArtifact{
DockerfilePath: dockerfile,
DockerfilePath: "Dockerfile",
InitImage: constants.DefaultBusyboxImage,
Image: kaniko.DefaultImage,
},
Expand Down

0 comments on commit d48faf2

Please sign in to comment.