Skip to content

Commit ebd5ed7

Browse files
test: CODER_WORKSPACE_OWNER_NAME is set
1 parent 22c4696 commit ebd5ed7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

agent/agent_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ func TestAgent_EnvironmentVariableExpansion(t *testing.T) {
12091209
func TestAgent_CoderEnvVars(t *testing.T) {
12101210
t.Parallel()
12111211

1212-
for _, key := range []string{"CODER", "CODER_WORKSPACE_NAME", "CODER_WORKSPACE_AGENT_NAME"} {
1212+
for _, key := range []string{"CODER", "CODER_WORKSPACE_NAME", "CODER_WORKSPACE_OWNER_NAME", "CODER_WORKSPACE_AGENT_NAME"} {
12131213
key := key
12141214
t.Run(key, func(t *testing.T) {
12151215
t.Parallel()
@@ -3079,6 +3079,9 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati
30793079
if metadata.WorkspaceName == "" {
30803080
metadata.WorkspaceName = "test-workspace"
30813081
}
3082+
if metadata.OwnerName == "" {
3083+
metadata.OwnerName = "test-user"
3084+
}
30823085
if metadata.WorkspaceID == uuid.Nil {
30833086
metadata.WorkspaceID = uuid.New()
30843087
}

0 commit comments

Comments
 (0)