Add IP routing rules and fix gRPC buffer retention
Build and Deploy Gateway / build-and-push (push) Successful in 40s
Build and Deploy Gateway / deploy (push) Successful in 14s

This commit is contained in:
2026-10-30 22:57:46 +03:00
parent 4c58384056
commit 97791443c0
15 changed files with 210 additions and 30 deletions
+18
View File
@@ -52,6 +52,24 @@ test('atomic import preserves revisions, rules, device checkpoints and journal;
assert.equal(fs.readFileSync(path.join(f.directory, 'activity-journal.json'), 'utf8'), originals[2]);
});
test('saved and applied IP rules retain values, order and revision across SQLite reopen', (t) => {
const f = fixture(t);
const rules = [
{ type: 'ip_cidr', value: '203.0.113.25', enabled: true, outbound: 'direct' },
{ type: 'domain_suffix', value: 'example.com', enabled: true, outbound: 'vpn' },
{ type: 'ip_cidr', value: '2001:db8::1', enabled: false, outbound: 'vpn' },
];
let store = f.open();
store.state.update((state) => ({
...state, routeRules: rules, appliedRouteRules: rules, routeRulesRevision: 7,
}));
store.close();
store = f.open();
assert.deepEqual(store.state.read().routeRules, rules);
assert.deepEqual(store.state.read().appliedRouteRules, rules);
assert.equal(store.state.read().routeRulesRevision, 7);
});
test('failed import leaves no partial documents and can be retried after fixing the original', (t) => {
const f = fixture(t);
fs.writeFileSync(path.join(f.directory, 'state.json'), JSON.stringify({ revision: 9 }));