-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
tests: e2e test to use conftest command instead version-specific command #2851
tests: e2e test to use conftest command instead version-specific command #2851
Conversation
conftextExec := policy.NewConfTestExecutorWorkflow(logger, binDir, &NoopTFDownloader{}) | ||
|
||
// swapping out version cache to something that always returns local contest | ||
// binary | ||
conftextExec.VersionCache = &LocalConftestCache{} | ||
|
||
policyCheckRunner, err := runtime.NewPolicyCheckStepRunner( | ||
conftestVersion, | ||
defaultTFVersion, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asis impl is invalid. runtime.NewPolicyCheckStepRunner
first parameter is defaultTfVersion.
func (m *LocalConftestCache) Get(key *version.Version) (string, error) { | ||
return exec.LookPath(fmt.Sprintf("conftest%s", ConftestVersion)) | ||
func (m *LocalConftestCache) Get(_ *version.Version) (string, error) { | ||
return exec.LookPath(conftestCommand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a main change in this PR. In e2e test, use conftest
command.
408e587
to
bc595ce
Compare
bc595ce
to
3862f45
Compare
3862f45
to
07c9de0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this test issue!
what
conftest
command insteadconftest$version
command in the e2e testconftest
command if version is not specifiedwhy
discussion
conftest$version
command on Dockerfile.conftest
and Dockerfile useconftest$version
.references
conftest
binary fail with newer versions of the utility #2600