Skip to content

Commit

Permalink
Added credentials change to permissions test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Nov 5, 2024
1 parent 4dfe9b6 commit 63b929a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/fs/permissions.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import assert from 'node:assert';
import { suite, test } from 'node:test';
import { credentials } from '../../dist/credentials.js';
import { R_OK, W_OK, X_OK } from '../../dist/emulation/constants.js';
import { join } from '../../dist/emulation/path.js';
import { ErrnoError } from '../../dist/error.js';
Expand Down Expand Up @@ -87,5 +88,8 @@ suite('Permissions', () => {
assert(stats.hasAccess(R_OK));
}

const copy = { ...credentials };
Object.assign(credentials, { uid: 1000, gid: 1000, euid: 1000, egid: 1000 });
test('Access controls: /', () => test_item('/'));
Object.assign(credentials, copy);
});

0 comments on commit 63b929a

Please sign in to comment.