-
Notifications
You must be signed in to change notification settings - Fork 36
Code cleanup testing improvements #94
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This replaces a separate create-packer-ci-key task to make `fly execute` easier.
b93e9cd to
2c83dc1
Compare
These rarely fail intermittently and multiple attempts slow down feedback. At least as of 2025... - cleanup quoting in pipeline yaml
This function no longer appears to be used within the windows stemcell repositoires. This was likely needed for versions of Windows older than the one currently being built (windows-2019).
- add `stembuild/out/` to gitignore
mockgen was used in only on place - regenerate counterfeiter fakes
as of Ginkgo v2 it is no longer needed to be able to `go run` ginkgo
Fixes spacing and variable scoping
- extract constants - capture error from Write() and panic if present - message used fantasy (2035) version instead of actual (2019) - extract common `write` func - extract messenger from main() - remove references to pivotal email - packagers use Messenger not STDOUT/STDERR Use base messenger methods and spy on output rather than fake messengers with specific output funcs that are mocked.
- parse args early - print error if arg parsing fails - print version info early if requested - simplify Messenger struct - use one context.Background() - use defer to remove stemcell automation artifact As part of this the environment_variable_warnings_test is updated because the output of `stembuild version` is printed before the ENV vars are validated.
Originally these tests relied on spying on "Messenger" structs, this commit changes the specs to also assert on the invocation (or not) of collaborator code instead of relying mostly on log output to test behavior.
- rename constant for clarity - use backtick to elimiate string escaping
- extract method to build VM auth parameter `-l ...` - rename internal struct for clarity - normalize spacing - move private members to end of file
- some tests under iaas_cli/ can be run locally but not when mixed with specs which require access to vCenter or similar setup - moves tests which require external resources under integration/iaas_cli/ - iaas_clients tests explicitly pass the vCenter's certificate, the integration/iaas_cli/ specs previously were not run on windows and on linux they rely on test setup which adds the certificate to the container's certificate store; the specs now write the certificate to disk and pass this path to vcenterclientfactory.FactoryConfig, as the - "contract tests" use vcsim as library, instead of building from source, this should allow testing on windows - (more) test code uses "_test" package names
2c83dc1 to
958ce3f
Compare
Pipeline uses DHCP for vSphere VMs created during stembuild.
selzoc
approved these changes
Aug 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains code and test reorganization which will enable #92