Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alphanota committed Jan 22, 2025
1 parent 6ff04ca commit c4f74ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/skaffold/graph/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ func sourceDependenciesForArtifact(ctx context.Context, a *latest.Artifact, cfg
// For `dev` it will succeed on the first dev loop and list any additional dependencies found from the base artifact's ONBUILD instructions as a file added instead of modified (see `filemon.Events`)
deps := docker.ResolveDependencyImages(a.Dependencies, r, false)

envTags, err := EnvTags(tag)
if err != nil {
envTags, evalErr := EnvTags(tag)
if evalErr != nil {
return nil, fmt.Errorf("unable to create build args: %w", err)
}

Expand Down
4 changes: 0 additions & 4 deletions pkg/skaffold/graph/dependencies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ COPY $IMAGE_TAG.go .
}
for _, test := range tests {
testutil.Run(t, test.description, func(t *testutil.T) {

t.Override(&docker.RetrieveImage, docker.NewFakeImageFetcher())

d := docker.NewSimpleStubArtifactResolver()
tmpDir.Write("Dockerfile", test.dockerFileContents)
if test.dockerBuildArgs != nil {
Expand All @@ -138,10 +136,8 @@ COPY $IMAGE_TAG.go .
}
test.artifact.DockerArtifact.BuildArgs = args
}

paths, err := sourceDependenciesForArtifact(context.Background(), test.artifact, test.dockerConfig, d, test.tag)
t.CheckNoError(err)

t.CheckDeepEqual(test.expectedPaths, paths,
cmpopts.SortSlices(func(x, y string) bool { return x < y }))
})
Expand Down

0 comments on commit c4f74ff

Please sign in to comment.