Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,14 @@ func runTest(t *testing.T,
}

id := uuid.New()
uniqueName := strings.ToLower(strings.Trim(base32.StdEncoding.EncodeToString(id[:]), "="))
// Prefix the unique name so that cloud resources created by acceptance tests
// (SQL warehouses, clusters, schemas, ...) are attributable to the CLI acceptance
// suite and can be found and cleaned up in shared test workspaces. The replacement
// below keys on the full value, so output normalization to [UNIQUE_NAME] is unaffected.
// The prefix has no separator on purpose: the name feeds both bundle/project names
// (which allow only [a-zA-Z0-9_]) and app hostnames (which disallow underscores), so a
// separator-less alphanumeric prefix is the only form valid in every context.
uniqueName := "cli" + strings.ToLower(strings.Trim(base32.StdEncoding.EncodeToString(id[:]), "="))
repls.Set(uniqueName, "[UNIQUE_NAME]")

var tmpDir string
Expand Down
Loading