@@ -14,8 +14,9 @@ import (
1414
1515const workspaceFixture = `
1616{
17- "id": 1,
18- "name": "wsalpha",
17+ "uuid": "9e5e56f2-4dc5-45ba-87f8-5fd2cd49c5a0",
18+ "id": "wsalpha",
19+ "uid": 1001,
1920 "email": "ws@example.com",
2021 "created": "2026-03-24T00:00:00Z",
2122 "updated": "2026-03-24T00:00:00Z"
@@ -28,8 +29,9 @@ const workspacesFixture = `
2829 "previous": null,
2930 "results": [
3031 {
31- "id": 1,
32- "name": "wsalpha",
32+ "uuid": "9e5e56f2-4dc5-45ba-87f8-5fd2cd49c5a0",
33+ "id": "wsalpha",
34+ "uid": 1001,
3335 "email": "ws@example.com",
3436 "created": "2026-03-24T00:00:00Z",
3537 "updated": "2026-03-24T00:00:00Z"
@@ -38,7 +40,7 @@ const workspacesFixture = `
3840}`
3941
4042const (
41- workspaceCreateExpected = `{"name ":"wsalpha","email":"ws@example.com"}`
43+ workspaceCreateExpected = `{"id ":"wsalpha","email":"ws@example.com"}`
4244 workspaceUpdateExpected = `{"email":"ws-new@example.com"}`
4345)
4446
@@ -71,7 +73,7 @@ func (f *fakeWorkspaceServer) ServeHTTP(res http.ResponseWriter, req *http.Reque
7173 res .WriteHeader (http .StatusInternalServerError )
7274 return
7375 }
74- res .Write ([]byte (`{"id":1,"name ":"wsalpha","email":"ws-new@example.com","created":"2026-03-24T00:00:00Z","updated":"2026-03-24T00:00:00Z"}` ))
76+ res .Write ([]byte (`{"uuid":"9e5e56f2-4dc5-45ba-87f8-5fd2cd49c5a0","id ":"wsalpha","uid":1001 ,"email":"ws-new@example.com","created":"2026-03-24T00:00:00Z","updated":"2026-03-24T00:00:00Z"}` ))
7577 return
7678 }
7779 if req .URL .Path == "/v2/workspaces/wsalpha" && req .Method == "DELETE" {
@@ -94,7 +96,7 @@ func TestWorkspaces(t *testing.T) {
9496 t .Fatal (err )
9597 }
9698
97- expected := api.Workspace {ID : 1 , Name : "wsalpha" , Email : "ws@example.com" , Created : "2026-03-24T00:00:00Z" , Updated : "2026-03-24T00:00:00Z" }
99+ expected := api.Workspace {UUID : "9e5e56f2-4dc5-45ba-87f8-5fd2cd49c5a0" , ID : "wsalpha" , UID : 1001 , Email : "ws@example.com" , Created : "2026-03-24T00:00:00Z" , Updated : "2026-03-24T00:00:00Z" }
98100
99101 list , _ , err := List (c , 100 )
100102 if err != nil {
0 commit comments