Commit 6594015
test: align tests with member-seeding and visibility merge
Two test-only fixes to match new behavior that already shipped:
1. service-tenant/project-provisioning.test.ts
ProjectProvisioningService.provisionProject now also seeds a row in
sys_project_member (creator → owner) so the dispatcher's per-user
membership lookup returns the role immediately after creation. Test
was still asserting only ['sys_project', 'sys_project_credential'];
expand to ['sys_project', 'sys_project_credential',
'sys_project_member'] and assert the seeded owner row.
2. service-cloud/public-artifact-routes.test.ts
Visibility merge collapsed 'unlisted' into 'private' with share-by-link
semantics. Rewrite the visibility-gating tests:
- 'private project: all public routes return 404' → split into
enumeration-404 and ?commit=<id>-200 (share-by-link works anonymously).
- 'private project: defaults when visibility is undefined' → asserts
both branches (no-commit 404, with-commit 200).
- Old 'unlisted' tests are kept as 'legacy unlisted rows behave like
private' to exercise the coercion path on old DB rows.
Full suite: pnpm test → 100/100 turbo tasks successful.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f7038cc commit 6594015
2 files changed
Lines changed: 34 additions & 17 deletions
File tree
- packages/services
- service-cloud/test
- service-tenant/src
Lines changed: 20 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
11 | 10 | | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
| 124 | + | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | | - | |
142 | | - | |
| 145 | + | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
154 | | - | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
| |||
0 commit comments