-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
13325: test: Attempt to fix TestCreatingProjectWithEmptyConfig r=abhinav a=abhinav TestCreatingProjectWithEmptyConfig appears to be broken on master: ``` === Failed === FAIL: cmd/pulumi TestCreatingProjectWithEmptyConfig (0.00s) new_test.go:330: Error Trace: /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/new_test.go:330 Error: Received unexpected error: A project with this name already exists Test: TestCreatingProjectWithEmptyConfig === FAIL: cmd/pulumi TestCreatingProjectWithEmptyConfig (re-run 1) (0.28s) new_test.go:330: Error Trace: /home/runner/work/pulumi/pulumi/pkg/cmd/pulumi/new_test.go:330 Error: Received unexpected error: A project with this name already exists Test: TestCreatingProjectWithEmptyConfig ``` As seen in #13323 and the attempts to land #13322. To reduce likelihood of "name already exists" errors, generate a random name for all tests where the name is currently based on the name of the temporary directory. Also, change all manually managed temporary directories (with an unchecked error) to `t.TempDir()` -- making the testing package handle cleanup of the temporary directories. Note: The randomly generated directory name is used only in cases where the name of the directory was used as input in the rest of the test. Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
- Loading branch information
Showing
3 changed files
with
42 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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