Update Harbor client and gateway integration workflows
Build and Deploy Gateway / build-and-push (push) Failing after 14s
Build and Deploy Gateway / deploy (push) Has been skipped

This commit is contained in:
2026-08-19 18:16:10 +03:00
parent 416b2b294a
commit daec12e013
63 changed files with 5016 additions and 108 deletions
+19
View File
@@ -56,6 +56,10 @@ test('typed Harbor client validates unknown state and isolates wire compatibilit
gatewayAvailable: true,
});
assert.equal(Object.hasOwn(parsed, 'proxyPort'), false);
assert.throws(() => parseHarborState({
...snapshot,
failover: { ...snapshot.failover, policy: { ...snapshot.failover.policy, intervalMs: 'fast' } },
}), { code: 'INCOMPATIBLE_API' });
let incompatible;
try {
parseHarborState({ ...snapshot, revision: -1 });
@@ -116,6 +120,21 @@ test('an equal revision keeps the current snapshot identity', () => {
assert.equal(next.snapshot.selection.desiredServerId, 'one');
});
test('equal revision accepts only newer failover observations and retires old epochs', () => {
const value = (epoch, sequence, status) => ({
...snapshot(4, 'one'),
failover: { observationEpoch: epoch, observationSequence: sequence, status },
});
let state = receive(initialHarborState, value('epoch-a', 1, 'primary'));
state = receive(state, value('epoch-a', 2, 'waiting-for-idle'));
assert.equal(state.snapshot.failover.status, 'waiting-for-idle');
state = receive(state, value('epoch-b', 1, 'reserve'));
assert.equal(state.snapshot.failover.status, 'reserve');
state = receive(state, value('epoch-a', 99, 'primary'));
assert.equal(state.snapshot.failover.status, 'reserve');
assert.deepEqual(state.failoverTransport.retiredEpochs, ['epoch-a']);
});
test('selection has no client-side shadow and follows canonical profile snapshots', () => {
const state = receive(initialHarborState, snapshot(2, 'two'));
assert.equal(Object.hasOwn(state, 'pendingServerId'), false);