From 727e63fc7cd73c0936627dc576d97244b4fac4b2 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 29 Aug 2023 11:25:49 +0000 Subject: [PATCH] test(coderd): fix workspace rename test Fixes #9400 --- coderd/workspaces_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coderd/workspaces_test.go b/coderd/workspaces_test.go index 8da37158b1e3e..f7940c7cfadb3 100644 --- a/coderd/workspaces_test.go +++ b/coderd/workspaces_test.go @@ -116,6 +116,8 @@ func TestWorkspace(t *testing.T) { if len(want) > 32 { want = want[:32-5] + "-test" } + // Sometimes truncated names result in `--test` which is not an allowed name. + want = strings.Replace(want, "--", "-", -1) err := client.UpdateWorkspace(ctx, ws1.ID, codersdk.UpdateWorkspaceRequest{ Name: want, })