Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests for various go mod corner cases. #179

Merged
merged 6 commits into from
Aug 5, 2020

Conversation

Cynocracy
Copy link
Contributor

@Cynocracy Cynocracy commented Jul 27, 2020

"Fixes" #171 (where I was confused by the behavior of modules) by ensuring ko behaves similarly to go build in various edge cases.

Jon Donovan added 2 commits July 26, 2020 21:47
I realize now this is run in a travis CI job :) So I'll make it actually work.
@Cynocracy Cynocracy changed the title Add manual integration tests for various go mod corner cases. Add integration tests for various go mod corner cases. Jul 27, 2020
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

I'm not sure if we'll always want to keep this exact behavior, but having a test is nice to know if we change it 😄 lgtm once you fix the build failures

hack/tools.go Outdated Show resolved Hide resolved
@Cynocracy
Copy link
Contributor Author

Oh, because it's not actually obvious: I wrote the test cases before checking behavior :) So at least I'm convinced this behavior is correct.

@jonjohnsonjr
Copy link
Collaborator

Same error :/

I think you need a build tag that doesn't get used so that it doesn't try to build it, we did something similar in go-containerregistry: https://github.com/google/go-containerregistry/pull/599/files#diff-39bad9c50a0f30bd6c067b83431bec76R1

@Cynocracy
Copy link
Contributor Author

Ah, I missed that I didn't have the tools build tag, yeah that's definitely necessary.

@Cynocracy
Copy link
Contributor Author

Any suggestions on what to set for KO_DOCKER_REPO ?

@jonjohnsonjr
Copy link
Collaborator

jonjohnsonjr commented Jul 28, 2020

Any suggestions on what to set for KO_DOCKER_REPO ?

I think the current integration tests use the --local flag to just write it into the docker daemon, which doesn't require KO_DOCKER_REPO to be set, if you wanna do that.

@Cynocracy
Copy link
Contributor Author

Ah, perfect, that works for me, thank you :)

@Cynocracy
Copy link
Contributor Author

Ready! I think :)

Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, I don't think I would have had to patience :)

@jonjohnsonjr jonjohnsonjr merged commit 6e4a93e into ko-build:master Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants