Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions graphql/server-test/__tests__/upload.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ function expectRlsDenied(
expect(
msg.includes('permission denied') ||
msg.includes('new row violates row-level security') ||
msg.includes('insufficient_privilege'),
msg.includes('insufficient_privilege') ||
msg.includes('No values were'),
).toBe(true);
return;
}
Expand Down Expand Up @@ -607,7 +608,7 @@ describe('Integration tests (uploads, tenant isolation, RLS)', () => {
const res = await postGraphQLViaApi(bobDatabaseId, 'bob-app', {
query: UPDATE_APP_FILE,
variables: {
input: { id: bobSeededPublicFileId, patch: { bucketId: bobPrivateBucketId } },
input: { id: bobSeededPublicFileId, appFilePatch: { bucketId: bobPrivateBucketId } },
},
});
expectRlsDenied(res, 'updateAppFile');
Expand All @@ -617,7 +618,7 @@ describe('Integration tests (uploads, tenant isolation, RLS)', () => {
const res = await postGraphQLViaApi(bobDatabaseId, 'bob-app', {
query: UPDATE_APP_FILE,
variables: {
input: { id: bobSeededPublicFileId, patch: { isPublic: false } },
input: { id: bobSeededPublicFileId, appFilePatch: { isPublic: false } },
},
});
expectRlsDenied(res, 'updateAppFile');
Expand Down Expand Up @@ -654,7 +655,7 @@ describe('Integration tests (uploads, tenant isolation, RLS)', () => {
const res = await postGraphQLViaApi(malloryDatabaseId, 'mallory-app', {
query: UPDATE_APP_FILE,
variables: {
input: { id: malloryPublicFileId, patch: { filename: 'hacked.txt' } },
input: { id: malloryPublicFileId, appFilePatch: { filename: 'hacked.txt' } },
},
});
expectRlsDenied(res, 'updateAppFile');
Expand Down Expand Up @@ -695,7 +696,7 @@ describe('Integration tests (uploads, tenant isolation, RLS)', () => {
const res = await postGraphQLViaApi(bobDatabaseId, 'bob-app', {
query: UPDATE_APP_BUCKET,
variables: {
input: { id: bobPublicBucketId, patch: { isPublic: false } },
input: { id: bobPublicBucketId, appBucketPatch: { isPublic: false } },
},
});
expectRlsDenied(res, 'updateAppBucket');
Expand Down