Skip to content

Commit fb9e503

Browse files
authored
[ws-manager-mk2] test create w/o git config (#18475)
1 parent 8e88e64 commit fb9e503

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

components/ws-manager-mk2/controllers/create_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,34 @@ func TestCreateWorkspaceEnvironment(t *testing.T) {
5757
},
5858
},
5959
},
60+
{
61+
Name: "without Git config",
62+
Context: &startWorkspaceContext{
63+
Config: &config.Configuration{
64+
WorkspaceClasses: map[string]*config.WorkspaceClass{
65+
"default": {Name: "default"},
66+
},
67+
},
68+
Workspace: &v1.Workspace{
69+
Spec: v1.WorkspaceSpec{
70+
Class: "default",
71+
},
72+
},
73+
},
74+
Expectation: Expectation{
75+
Vars: []corev1.EnvVar{
76+
{Name: "GITPOD_REPO_ROOT", Value: "/workspace"},
77+
{Name: "GITPOD_REPO_ROOTS", Value: "/workspace"},
78+
{Name: "GITPOD_THEIA_PORT", Value: "0"},
79+
{Name: "THEIA_WORKSPACE_ROOT", Value: "/workspace"},
80+
{Name: "GITPOD_WORKSPACE_CLASS", Value: "default"},
81+
{Name: "THEIA_SUPERVISOR_ENDPOINT", Value: ":0"},
82+
{Name: "THEIA_WEBVIEW_EXTERNAL_ENDPOINT", Value: "webview-{{hostname}}"},
83+
{Name: "THEIA_MINI_BROWSER_HOST_PATTERN", Value: "browser-{{hostname}}"},
84+
{Name: "GITPOD_INTERVAL", Value: "0"}, {Name: "GITPOD_MEMORY", Value: "0"},
85+
},
86+
},
87+
},
6088
}
6189

6290
for _, test := range tests {

0 commit comments

Comments
 (0)