Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

Commit 04f01fa

Browse files
test(data-access): remove redundant permission handling already fixed previously
Remove the table-specific RPC-only denial handling because the existing expected permission-denial pattern already addresses the integration-test failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 406b238 commit 04f01fa

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

‎packages/spacecat-shared-data-access/test/it/postgrest/all-collections-methods-coverage.test.js‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ const collectErrorMessages = (error) => {
107107
return messages.join(' | ');
108108
};
109109

110-
// RPC-only tables: data-service revokes every PostgREST table grant and exposes them
111-
// solely through SECURITY DEFINER RPCs, so generic REST reads are denied by design.
112-
const RPC_ONLY_TABLES = {
113-
AbvOnboardingClaim: 'abv_onboarding_claims',
114-
};
115-
116-
const isRpcOnlyDenial = (entityName, error) => RPC_ONLY_TABLES[entityName] !== undefined
117-
&& collectErrorMessages(error).includes(`permission denied for table ${RPC_ONLY_TABLES[entityName]}`);
118-
119110
const isExpectedInvocationError = (error) => {
120111
const message = collectErrorMessages(error);
121112
return EXPECTED_INVOCATION_ERROR_PATTERNS.some((pattern) => message.includes(pattern));
@@ -351,10 +342,6 @@ describe('PostgREST IT - all collections methods coverage', () => {
351342
return;
352343
}
353344

354-
if (isRpcOnlyDenial(entityName, error)) {
355-
return;
356-
}
357-
358345
// For mutating methods and synthetic-argument validation in this smoke test,
359346
// controlled errors are acceptable.
360347
if (isMutatingMethod(methodName) || isExpectedInvocationError(error)) {

0 commit comments

Comments
 (0)