@@ -8,13 +8,19 @@ import (
88 "testing"
99)
1010
11+ func TestWorkspaceIDRequiredForDelete (t * testing.T ) {
12+ if err := g .DeleteWorkspace (context .Background (), "" ); err == nil {
13+ t .Error ("Expected error but got nil" )
14+ }
15+ }
16+
1117func TestCreateAndDeleteWorkspace (t * testing.T ) {
1218 id , err := g .CreateWorkspace (context .Background (), "directory" )
1319 if err != nil {
1420 t .Fatalf ("Error creating workspace: %v" , err )
1521 }
1622
17- err = g .DeleteWorkspace (context .Background (), DeleteWorkspaceOptions { WorkspaceID : id } )
23+ err = g .DeleteWorkspace (context .Background (), id )
1824 if err != nil {
1925 t .Errorf ("Error deleting workspace: %v" , err )
2026 }
@@ -27,7 +33,7 @@ func TestWriteReadAndDeleteFileFromWorkspace(t *testing.T) {
2733 }
2834
2935 t .Cleanup (func () {
30- err := g .DeleteWorkspace (context .Background (), DeleteWorkspaceOptions { WorkspaceID : id } )
36+ err := g .DeleteWorkspace (context .Background (), id )
3137 if err != nil {
3238 t .Errorf ("Error deleting workspace: %v" , err )
3339 }
@@ -66,7 +72,7 @@ func TestLsComplexWorkspace(t *testing.T) {
6672 }
6773
6874 t .Cleanup (func () {
69- err := g .DeleteWorkspace (context .Background (), DeleteWorkspaceOptions { WorkspaceID : id } )
75+ err := g .DeleteWorkspace (context .Background (), id )
7076 if err != nil {
7177 t .Errorf ("Error deleting workspace: %v" , err )
7278 }
@@ -139,7 +145,7 @@ func TestCreateAndDeleteWorkspaceS3(t *testing.T) {
139145 t .Fatalf ("Error creating workspace: %v" , err )
140146 }
141147
142- err = g .DeleteWorkspace (context .Background (), DeleteWorkspaceOptions { WorkspaceID : id } )
148+ err = g .DeleteWorkspace (context .Background (), id )
143149 if err != nil {
144150 t .Errorf ("Error deleting workspace: %v" , err )
145151 }
@@ -156,7 +162,7 @@ func TestWriteReadAndDeleteFileFromWorkspaceS3(t *testing.T) {
156162 }
157163
158164 t .Cleanup (func () {
159- err := g .DeleteWorkspace (context .Background (), DeleteWorkspaceOptions { WorkspaceID : id } )
165+ err := g .DeleteWorkspace (context .Background (), id )
160166 if err != nil {
161167 t .Errorf ("Error deleting workspace: %v" , err )
162168 }
@@ -199,7 +205,7 @@ func TestLsComplexWorkspaceS3(t *testing.T) {
199205 }
200206
201207 t .Cleanup (func () {
202- err := g .DeleteWorkspace (context .Background (), DeleteWorkspaceOptions { WorkspaceID : id } )
208+ err := g .DeleteWorkspace (context .Background (), id )
203209 if err != nil {
204210 t .Errorf ("Error deleting workspace: %v" , err )
205211 }
0 commit comments