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

ci: Move more tests to linux-only integration tests #11250

Merged
merged 1 commit into from Nov 9, 2022

Conversation

AaronFriel
Copy link
Member

Reduces the set of smoke tests run on Windows & macOS, balances the reduced parallelism #11249 by moving tests which don't seem to obviously entail cross-platform behavior changes. The tests moved to only run on Linux environments are listed below and except for the first, all were split from integration_test.go.

  • TestRefreshGo checks that the Pulumi.yaml options.refresh option is obeyed (moved to integration_go_test from integration_go_smoke_test)
  • TestStackTagValidation which tests Pulumi.yaml validation
  • TestStackInitValidation which tests an error on running pulumi stack init
  • TestConfigPaths which tests pulumi config set under a wide variety of inputs
  • TestDestroyStackRef which tests running pulumi destroy on a stack with a large stack reference
  • TestJSONOutput which tests output JSON output diagnostics
  • TestExcludeProtected which tests behavior around marking resources protected
  • TestProviderDownloadURL which tests the PluginDownloadURL resource option, but does not actually perform plugin acquisition.

These tests either didn't seem to be obviously platform specific or there was a narrower test could verify that parsing and handling the same files worked correctly. As examples of those, the remaining tests that will run on smoke tests (all platforms) are:

  • TestConfigSave which tests pulumi config set and stack config parsing
  • TestRotatePassphrase which tests changing the local secrets provider passphrase via stdin - which hypothetically could vary across platforms
  • TestJSONOutputWithStreamingPreview tests streaming output and event capturing
  • TestPassphrasePrompting tests stdin/stdout behavior in prompting for passphrases.

Lastly, the TestProviderDownloadURL test was modified to ensure we wouldn't make requests to uncontrolled third party URLs. Though the tests don't acquire plugins, we don't control "get.com", so the .test TLD is used to ensure test behavior cannot depend on that domain.

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Nov 3, 2022

Changelog

[uncommitted] (2022-11-08)

@AaronFriel AaronFriel changed the title ci: Move 14 tests to linux-only integration tests ci: Move more tests to linux-only integration tests Nov 3, 2022
@AaronFriel AaronFriel added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Nov 4, 2022
@@ -7,10 +7,10 @@ public MyStack()
// Create an AWS resource (S3 Bucket)
var r = new Random(
"default", 10, new ComponentResourceOptions{
PluginDownloadURL = "get.com",
PluginDownloadURL = "get.example.test",
Copy link
Contributor

Choose a reason for hiding this comment

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

This applies to other test-content changes, but what's the reason for this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

I really don't like it when uncontrolled third party URLs/domain names are in tests. If everything is correctly mocked it's fine, but if not suddenly dev machines & CI are making requests to who-knows-what.

It's even scarier here because these would potentially cause us to download and install a tar.gz file in CI! I checked and that doesn't happen here, but whew, kind of scary.

The IETF reserved .test as a top-level domain that will never be registered or respond to DNS. (Same with .example, .invalid, a few others.)

@AaronFriel
Copy link
Member Author

bors merge

@bors
Copy link
Contributor

bors bot commented Nov 9, 2022

Build succeeded:

@bors bors bot merged commit d13f47a into master Nov 9, 2022
@pulumi-bot pulumi-bot deleted the friel/fewer-tests-on-windows branch November 9, 2022 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants