mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-18 22:24:17 +01:00
Keep a policy-floor test passing after gstack's version bump to 1.101 (#4495)
A policy-floor test assumed gstack's own version stays below the next minor after the newest policy key. The v1.101 release (#4493) reaches that number, so its CI fails; the test now checks a floor above both. Why: this unblocks today's stable release, which carries a security fix (#4486) and four blocker fixes. Nothing to do as a reader. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
fda9dea79f
commit
3610130d6e
2 files changed
+3
-1
No files matched your search
@@ -0,0 +1,2 @@
|
||||
### Tests
|
||||
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI.
|
||||
@@ -200,7 +200,7 @@ describe('gstack-doctor --check floor row', () => {
|
||||
const lagging = floorRow(f, project(f, known));
|
||||
expect(lagging.line).toBe(`PASS floor ${known} declared by ${dir}/.gstack/ship-policy.json (installed 1.0.0.0, reads policies as ${known})`);
|
||||
expect(validatePolicy({ min_gstack_version: known }, { gstackVersion: runningGstackVersion() })).toEqual([]);
|
||||
const next = known.replace(/^(\d+)\.(\d+)\..*$/, (_, a, b) => `${a}.${Number(b) + 1}.0.0`);
|
||||
const next = (newer(VERSION, known) ? VERSION : known).replace(/^(\d+)\.(\d+)\..*$/, (_, a, b) => `${a}.${Number(b) + 1}.0.0`);
|
||||
expect(validatePolicy({ min_gstack_version: next }).map(e => e.code)).toEqual(['POLICY_GSTACK_TOO_OLD']);
|
||||
expect(floorRow(f, project(f, next)).status).toBe('WARN');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user