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
+22
View File
@@ -109,6 +109,9 @@ function createHarness(overrides = {}) {
events.push('operation');
return operation();
},
restoreAppliedActivation: overrides.restoreAppliedActivation
? async (previousState) => overrides.restoreAppliedActivation(previousState, events)
: undefined,
});
return {
@@ -246,6 +249,24 @@ test('route rules rollback continues and classifies runtime restore failure', as
assert.ok(broken.events.filter((event) => event === 'state.update').length >= 1);
});
test('route rules rollback restores the previous reserve selector', async () => {
const state = canonicalState();
state.appliedFailoverPolicy = {
primary: { profileId: 'primary', serverId: 'other' },
reserve: { profileId: 'primary', serverId: 'server' },
};
const harness = createHarness({
state,
failures: { stateUpdates: [{ after: new Error('state') }] },
restoreAppliedActivation: async (previousState, events) => {
assert.equal(previousState.appliedServerId, 'server');
events.push('selector.reserve');
},
});
await assert.rejects(harness.service.update(newRules, 2, 2), /state/);
assert.ok(harness.events.indexOf('selector.reserve') > harness.events.indexOf('runtime.restore'));
});
test('route rules route preserves one adapter and state-only response', async () => {
const calls = [];
const route = createRouteRulesRoute({
@@ -260,5 +281,6 @@ test('route rules route preserves one adapter and state-only response', async ()
const source = readFileSync(new URL('../../src/server/index.ts', import.meta.url), 'utf8');
assert.match(source, /createRouteRulesRoute\(\{/);
assert.match(source, /state\.appliedFailoverPolicy[\s\S]*buildFailoverCandidate\(\{ \.\.\.state, routeRules \}, 'applied'\)\.config/);
assert.doesNotMatch(source, /function applyRouteRules|req\.url === ['"]\/api\/route-rules['"]/);
});