Skip to content

Jib Builder: add more tests#2390

Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:more-jib-tests
Jul 2, 2019
Merged

Jib Builder: add more tests#2390
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:more-jib-tests

Conversation

@dgageot
Copy link
Copy Markdown
Contributor

@dgageot dgageot commented Jul 2, 2019

Signed-off-by: David Gageot david@gageot.net

Signed-off-by: David Gageot <david@gageot.net>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 2, 2019

Codecov Report

Merging #2390 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/build/local/local.go 36.76% <ø> (ø) ⬆️
pkg/skaffold/build/local/jib_gradle.go 100% <100%> (+30.43%) ⬆️
pkg/skaffold/build/local/jib_maven.go 100% <100%> (+22.22%) ⬆️

)

// For testing
var (
Copy link
Copy Markdown
Member

@loosebazooka loosebazooka Jul 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand this specific part? Does this just become a variable in the scope of the local pkg? Was there some problem with using the direct reference (docker.RemoteDigest) in the jib files? Mostly because it seems harder to find the reference now, when looking through code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the simplest way to mock the call to docker.RemoteDigest. We use that pattern in. a lot of places.

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Jul 2, 2019

@loosebazooka Looks like the changes to the owners file are still not enough

@dgageot dgageot merged commit 36edb70 into GoogleContainerTools:master Jul 2, 2019
@TadCordle
Copy link
Copy Markdown
Contributor

Might be because you made a change to local.go?

@loosebazooka
Copy link
Copy Markdown
Member

loosebazooka commented Jul 2, 2019

@dgageot as a followup perhaps change all of the docker.RemoteDigest -> getRemoteDigest ?

build/local/bazel.go:90: return docker.RemoteDigest(tag, insecureRegistries)
build/local/custom.go:38: return docker.RemoteDigest(tag, b.insecureRegistries)
build/cache/save.go:110: return docker.RemoteDigest(img, c.insecureRegistries)
build/cache/save.go:114: return docker.RemoteDigest(img, c.insecureRegistries)
build/cache/cache.go:58: remoteDigest    = docker.RemoteDigest
build/cluster/kaniko.go:91: return docker.RemoteDigest(tag, b.insecureRegistries)
build/cluster/cluster.go:71: return docker.RemoteDigest(tag, b.insecureRegistries)

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Jul 2, 2019

Well, let’s do it only when a test requires it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants