Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
42 lines
1.3 KiB
Go
42 lines
1.3 KiB
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
tuttigenerated "github.com/tutti-os/tutti/services/tuttid/api/generated"
|
|
workspacebiz "github.com/tutti-os/tutti/services/tuttid/biz/workspace"
|
|
workspaceservice "github.com/tutti-os/tutti/services/tuttid/service/workspace"
|
|
)
|
|
|
|
func TestUpdateWorkspaceDoesNotTrackWorkspaceRenamedAfterSuccessfulUpdate(t *testing.T) {
|
|
reporter := &recordingAnalyticsReporter{}
|
|
api := DaemonAPI{
|
|
AnalyticsReporter: reporter,
|
|
WorkspaceService: stubCatalogService{
|
|
updateFn: func(_ context.Context, workspaceID string, input workspaceservice.UpdateInput) (workspacebiz.Summary, error) {
|
|
return workspacebiz.Summary{
|
|
ID: workspaceID,
|
|
Name: input.Name,
|
|
}, nil
|
|
},
|
|
},
|
|
}
|
|
|
|
response, err := api.UpdateWorkspace(context.Background(), tuttigenerated.UpdateWorkspaceRequestObject{
|
|
WorkspaceID: tuttigenerated.WorkspaceID("ws-1"),
|
|
Body: &tuttigenerated.UpdateWorkspaceRequest{
|
|
Name: "Renamed Workspace",
|
|
},
|
|
})
|
|
if err != nil {
|
|
t.Fatalf("UpdateWorkspace() error = %v", err)
|
|
}
|
|
if _, ok := response.(tuttigenerated.UpdateWorkspace200JSONResponse); !ok {
|
|
t.Fatalf("response = %T, want %T", response, tuttigenerated.UpdateWorkspace200JSONResponse{})
|
|
}
|
|
if len(reporter.events) != 0 {
|
|
t.Fatalf("analytics events = %d, want 0", len(reporter.events))
|
|
}
|
|
}
|