Refactor all references to computer to Superbrain
release gate / check (push) Failing after 6m55s

This commit is contained in:
Andrew S Erwin
2026-10-22 00:33:44 -05:00
parent 45aa3c80aa
commit d870eece1e
84 changed files with 438 additions and 381 deletions
+9 -9
View File
@@ -9,8 +9,8 @@ import (
func TestPageRevisionHistory(t *testing.T) {
srv := testServer(t)
alice := newAPIUser(t, srv, "trust-history@computer.test")
bob := newAPIUser(t, srv, "trust-history-other@computer.test")
alice := newAPIUser(t, srv, "trust-history@superbrain.test")
bob := newAPIUser(t, srv, "trust-history-other@superbrain.test")
page := alice.request("POST", "/api/pages", map[string]any{"title": "History", "content": "version one"}, 201)["id"].(string)
revisions := alice.getJSON("/api/pages/"+page+"/revisions", 200)
@@ -52,8 +52,8 @@ func TestPageRevisionHistory(t *testing.T) {
func TestTrashRestoreNeverResurrectsGrants(t *testing.T) {
srv := testServer(t)
alice := newAPIUser(t, srv, "trust-trash@computer.test")
bob := newAPIUser(t, srv, "trust-trash-other@computer.test")
alice := newAPIUser(t, srv, "trust-trash@superbrain.test")
bob := newAPIUser(t, srv, "trust-trash-other@superbrain.test")
bobID := meID(bob)
tag := alice.request("POST", "/api/tags", map[string]any{"name": "Restored tag"}, 201)["id"].(string)
@@ -162,9 +162,9 @@ func TestTrashRestoreNeverResurrectsGrants(t *testing.T) {
func TestCollectionSharingPermissionBoundary(t *testing.T) {
srv := testServer(t)
alice := newAPIUser(t, srv, "trust-coll-share@computer.test")
bob := newAPIUser(t, srv, "trust-coll-recipient@computer.test")
carol := newAPIUser(t, srv, "trust-coll-third@computer.test")
alice := newAPIUser(t, srv, "trust-coll-share@superbrain.test")
bob := newAPIUser(t, srv, "trust-coll-recipient@superbrain.test")
carol := newAPIUser(t, srv, "trust-coll-third@superbrain.test")
bobID, carolID := meID(bob), meID(carol)
bm := alice.request("POST", "/api/bookmarks", map[string]any{"url": "https://127.0.0.1/collection-share", "title": "Shared via project", "notes": "secret owner notes", "isPublic": true}, 201)
@@ -249,7 +249,7 @@ func TestCollectionSharingPermissionBoundary(t *testing.T) {
func TestStructuredExport(t *testing.T) {
srv := testServer(t)
alice := newAPIUser(t, srv, "trust-export@computer.test")
alice := newAPIUser(t, srv, "trust-export@superbrain.test")
tag := alice.request("POST", "/api/tags", map[string]any{"name": "Export tag"}, 201)["id"].(string)
bm := alice.request("POST", "/api/bookmarks", map[string]any{"url": "https://127.0.0.1/export", "title": "Exported bookmark", "tagIds": []string{tag}}, 201)["id"].(string)
@@ -258,7 +258,7 @@ func TestStructuredExport(t *testing.T) {
alice.request("POST", "/api/collections/"+col+"/items", map[string]any{"bookmarkId": bm}, 201)
v := alice.request("GET", "/api/export", nil, 200)
if v["format"] != "computer-export" || v["version"].(float64) != 1 {
if v["format"] != "superbrain-export" || v["version"].(float64) != 1 {
t.Fatalf("export envelope: %v", v)
}
if len(v["bookmarks"].([]any)) != 1 || len(v["pages"].([]any)) != 1 || len(v["tags"].([]any)) != 1 || len(v["collections"].([]any)) != 1 {