Open ekcasey opened 3 years ago
The tests should run on Linux and Windows. They should cover most command invocations (see Detector & Analyzer as examples) and should include a test of the exit code in case of error (see Detector as an example).
I'll work on this
Thanks @haanhvu! Should I assign you the issue?
Thanks @haanhvu! Should I assign you the issue?
Yes, please!
Hi @natalieparellano from what I can see, we already have acceptance tests for rebaser here: https://github.com/buildpacks/lifecycle/blob/main/rebaser_test.go
So this issue is about extending these test cases, right? If yes, then what are the most important test cases that we should focus on now?
Ah, the tests in rebaser.go are units (they invoke rebaser.Rebase
) - we want something that calls /cnb/lifecycle/rebaser <image to rebase>
. You can take a look at the acceptance tests for the analyzer to see how we compile the binary and spin up a test registry with fixture images to interact with (note that the tests for the rebaser will be significantly simpler than what exists for the analyzer). Please don't hesitate to reach out if you have any questions!
Hi @natalieparellano I'm facing this issue with acceptance test files in VSCode:
No packages found for open file /home/admin1/go/src/github.com/buildpacks/lifecycle/acceptance/exporter_test.go: If this file contains build tags, try adding \"-tags=<build tag>\" to your gopls \"buildFlags\" configuration (see (https://github.com/golang/tools/blob/master/gopls/doc/settings.md#buildflags-string).\nOtherwise, see the troubleshooting guidelines for help investigating (https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md).
Does this mean I have to manually add all the flags to buildFlags
in gopls
in VSCode settings?
Or is there a better/faster way to fix this issue?
Thanks!
@haanhvu you can try adding -tags=acceptance
to your configuration. This is needed due to
//go:build acceptance
// +build acceptance
at the top of the file.
@haanhvu were you still interested in this? If not @dlion would like to take it over
@haanhvu were you still interested in this? If not @dlion would like to take it over
I haven't touched this for a while. Please go head.
@natalieparellano is this issue still open? If yes I would like to work on it. Thank you
@satyazzz123 apologies for the slow reply. I don't believe anyone is working on this. I can assign the issue to you if you'd like
Add acceptance tests for rebaser.