@@ -66,6 +66,8 @@ func TestPrebuildWorkspaceTaskSuccess(t *testing.T) {
66
66
api .Done (t )
67
67
})
68
68
69
+ // TODO: change to use server API to launch the workspace, so we could run the integration test as the user code flow
70
+ // which is client -> server -> ws-manager rather than client -> ws-manager directly
69
71
_ , stopWs , err := integration .LaunchWorkspaceDirectly (t , ctx , api , integration .WithRequestModifier (func (req * wsmanapi.StartWorkspaceRequest ) error {
70
72
req .Type = wsmanapi .WorkspaceType_PREBUILD
71
73
@@ -83,8 +85,6 @@ func TestPrebuildWorkspaceTaskSuccess(t *testing.T) {
83
85
Spec : & csapi.WorkspaceInitializer_Git {
84
86
Git : & csapi.GitInitializer {
85
87
RemoteUri : test .ContextURL ,
86
- TargetMode : csapi .CloneTargetMode_REMOTE_BRANCH ,
87
- CloneTaget : "main" ,
88
88
CheckoutLocation : test .CheckoutLocation ,
89
89
Config : & csapi.GitConfig {},
90
90
},
@@ -233,6 +233,8 @@ func TestOpenWorkspaceFromPrebuild(t *testing.T) {
233
233
})
234
234
235
235
// create a prebuild and stop workspace
236
+ // TODO: change to use server API to launch the workspace, so we could run the integration test as the user code flow
237
+ // which is client -> server -> ws-manager rather than client -> ws-manager directly
236
238
_ , prebuildStopWs , err := integration .LaunchWorkspaceDirectly (t , ctx , api , integration .WithRequestModifier (func (req * wsmanapi.StartWorkspaceRequest ) error {
237
239
req .Type = wsmanapi .WorkspaceType_PREBUILD
238
240
req .Spec .Envvars = append (req .Spec .Envvars , & wsmanapi.EnvironmentVariable {
@@ -244,8 +246,6 @@ func TestOpenWorkspaceFromPrebuild(t *testing.T) {
244
246
Spec : & csapi.WorkspaceInitializer_Git {
245
247
Git : & csapi.GitInitializer {
246
248
RemoteUri : test .ContextURL ,
247
- TargetMode : csapi .CloneTargetMode_REMOTE_BRANCH ,
248
- CloneTaget : "main" ,
249
249
CheckoutLocation : test .CheckoutLocation ,
250
250
Config : & csapi.GitConfig {},
251
251
},
@@ -265,6 +265,8 @@ func TestOpenWorkspaceFromPrebuild(t *testing.T) {
265
265
t .Logf ("prebuild snapshot: %s, vsName: %s, vsHandle: %s" , prebuildSnapshot , vsInfo .VolumeSnapshotName , vsInfo .VolumeSnapshotHandle )
266
266
267
267
// launch the workspace from prebuild
268
+ // TODO: change to use server API to launch the workspace, so we could run the integration test as the user code flow
269
+ // which is client -> server -> ws-manager rather than client -> ws-manager directly
268
270
ws , stopWs , err := integration .LaunchWorkspaceDirectly (t , ctx , api , integration .WithRequestModifier (func (req * wsmanapi.StartWorkspaceRequest ) error {
269
271
req .Spec .FeatureFlags = test .FF
270
272
req .Spec .Initializer = & csapi.WorkspaceInitializer {
@@ -277,8 +279,6 @@ func TestOpenWorkspaceFromPrebuild(t *testing.T) {
277
279
Git : []* csapi.GitInitializer {
278
280
{
279
281
RemoteUri : test .ContextURL ,
280
- TargetMode : csapi .CloneTargetMode_REMOTE_BRANCH ,
281
- CloneTaget : "main" ,
282
282
CheckoutLocation : test .CheckoutLocation ,
283
283
Config : & csapi.GitConfig {},
284
284
},
0 commit comments