Go: Add tests for resolve build-environment
#16462
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
We added support for the
resolve build-environment
command to the Go autobuilder last year, but we did not add any integration tests to this repository at the time. We have tests elsewhere, but those will only catch bugs in theresolve build-environment
implementation at later stages, often long after a PR modifying the behaviour here is merged.What this PR does
This PR builds on recent improvements to the Go integration tests (having a common Go-specific integration test library) and the addition of
resolve_environment_utils
to the internal repository (that PR needs to be merged for this to work) to:resolve build-environment
for every integration test. The main benefit of doing this is that critical bugs in the implementation should now become apparent much earlier.GOTOOLCHAIN
environment variable, to forceresolve build-environment
to recommend a newer Go version.