mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-02 23:14:33 +01:00
test: the docs-only receipt digest test keeps its gate scan out of the real home (free-suite shard 5 FREE_SUBSHARD_REJECTED)
This commit is contained in:
1 parent
d7ad64eae4
commit
6a9e34ab1b
1 file changed
+6
-1
@@ -264,7 +264,12 @@ describe('the receipt binds the selection the reviewers read', () => {
|
||||
const head = commit(repo, { 'testdata/expected.txt': 'expected output\n' });
|
||||
const planned = JSON.parse(runBin(repo, 'gstack-review-plan', ['--base', 'main', '--json']).out).review_exclude;
|
||||
expect(planned.kept_files).toEqual([{ path: 'testdata/expected.txt', reason: 'gate-tagged' }]);
|
||||
const { exclude } = receiptReviewAtHead(repo.work, 'main', path.join(import.meta.dir, '..', 'bin'), head);
|
||||
const prior = process.env.GSTACK_STATE_ROOT;
|
||||
process.env.GSTACK_STATE_ROOT = path.join(repo.root, 'receipt-state');
|
||||
let review: ReturnType<typeof receiptReviewAtHead>;
|
||||
try { review = receiptReviewAtHead(repo.work, 'main', path.join(import.meta.dir, '..', 'bin'), head); }
|
||||
finally { if (prior === undefined) delete process.env.GSTACK_STATE_ROOT; else process.env.GSTACK_STATE_ROOT = prior; }
|
||||
const { exclude } = review;
|
||||
expect(exclude.state === 'active' ? exclude.record.digest : exclude.state).toBe(planned.digest);
|
||||
});
|
||||
// Value: protects=a receipt names the selection the rendered briefs read, a base merge that leaves the policy alone still
|
||||
|
||||
Reference in new issue
Block a user