- Notifications
You must be signed in to change notification settings - Fork1k
Commita71e5cc
authored
test: add increasing integer to GetRandomNameHyphenated (#19481)
Fixes flakes like the following:```workspaces_test.go:4938: Error Trace:/home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:1279/home/runner/work/coder/coder/coderd/workspaces_test.go:4938/home/runner/work/coder/coder/coderd/workspaces_test.go:5044Error: Received unexpected error:POSThttp://127.0.0.1:42597/api/v2/users/me/workspaces: unexpected status code 409: Workspace "romantic-mcclintock" already exists.name: This value is already in use and should be unique.Test: TestWorkspaceCreateWithImplicitPreset/SinglePresetWithParameters```https://github.com/coder/coder/actions/runs/17142665868/job/48633017007?pr=19464 Which are caused by insufficient randomness when creating multipleworkspaces with random names. Two words is not enough to avoid flakes.We have a `testutil.GetRandomName` function that appends a monotonicallyincreasing integer, but this alternative function that uses hyphensdoesn't add that integer. This PR fixes that by just`testutil.GetRandomName`1 parent9a872f9 commita71e5cc
1 file changed
+1
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
|
0 commit comments
Comments
(0)