mirror of https://github.com/pulumi/pulumi.git
92f5b4a374
10720: ci: Enable programtests against local backend, improve isolation r=AaronFriel a=AaronFriel These changes make integration tests run much more quickly on a local dev loop, for easily parallelized program tests like in the `integration_go_test.go` file the improvement was on the order of minutes across all tests. The changes rely on setting `PULUMI_BACKEND_URL` to override the backend during particular tests. The backend is set to a temporary directory which is cleaned up on exit. A helper function `NewBackendUrl(t *testing.T)` is added to enable When `PULUMI_TEST_USE_SERVICE=true`, the `RequireService` option is set to true. When `RequireService == true`, the test is skipped if an access token is not present, improving local dev experience by skipping tests which would error very loudly. When `RequireService == false and CloudURL == ""`, then we use the helper function to create a temporary directory and point the filestate backend to it. The CloudURL check allows tests which, even in the presence of `PULUMI_TEST_USE_SERVICE=true`, to still run against a local backend. E.g.: ```go localTestOptions := testOptions.With(integration.ProgramTestOptions{ CloudURL: integration.NewBackendURL(t), }) ``` 10734: prepare for next release (v3.41.0) r=AaronFriel a=pulumi-bot Co-authored-by: Aaron Friel <mayreply@aaronfriel.com> Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
dynamic-provider | ||
formattable | ||
minimal | ||
multilang/nodejs | ||
secrets | ||
examples_test.go |