Add DNS diagnostics across dataplane and client
This commit is contained in:
@@ -34,6 +34,8 @@ test('control uses the dataplane socket protocol', async () => {
|
||||
[{ id: 'custom-test', url: 'https://example.com' }],
|
||||
'site:custom-test',
|
||||
);
|
||||
await client.getDnsDiagnosticsCatalog([{ id: 'dns' }], [{ id: 'domain' }]);
|
||||
await client.runDnsDiagnostics([{ id: 'dns' }], [{ id: 'domain' }], 'youtube', 'google-dns');
|
||||
await client.checkConfig({ outbounds: [] });
|
||||
await client.runFailoverProbe('primary', [], 'site:youtube', 9_000);
|
||||
await client.readFailoverSelector();
|
||||
@@ -53,6 +55,8 @@ test('control uses the dataplane socket protocol', async () => {
|
||||
'GET /device-policy /run/dataplane.sock',
|
||||
'PUT /device-policy /run/dataplane.sock',
|
||||
'POST /diagnostics/connectivity /run/dataplane.sock',
|
||||
'POST /diagnostics/dns/catalog /run/dataplane.sock',
|
||||
'POST /diagnostics/dns /run/dataplane.sock',
|
||||
'POST /config/check /run/dataplane.sock',
|
||||
'POST /failover/probe /run/dataplane.sock',
|
||||
'GET /failover/selector /run/dataplane.sock',
|
||||
@@ -68,10 +72,18 @@ test('control uses the dataplane socket protocol', async () => {
|
||||
target: 'site:custom-test',
|
||||
});
|
||||
assert.equal(requests[8].timeoutMs, 25_000);
|
||||
assert.deepEqual(requests[9].body, { config: { outbounds: [] } });
|
||||
assert.deepEqual(requests[10].body, { role: 'primary', services: [], target: 'site:youtube', timeoutMs: 9_000 });
|
||||
assert.equal(requests[10].timeoutMs, 19_000);
|
||||
assert.deepEqual(requests[12].body, { role: 'reserve' });
|
||||
assert.deepEqual(requests[9].body, {
|
||||
customResolvers: [{ id: 'dns' }], customDomains: [{ id: 'domain' }],
|
||||
});
|
||||
assert.deepEqual(requests[10].body, {
|
||||
customResolvers: [{ id: 'dns' }], customDomains: [{ id: 'domain' }],
|
||||
domainId: 'youtube', resolverId: 'google-dns',
|
||||
});
|
||||
assert.equal(requests[10].timeoutMs, 40_000);
|
||||
assert.deepEqual(requests[11].body, { config: { outbounds: [] } });
|
||||
assert.deepEqual(requests[12].body, { role: 'primary', services: [], target: 'site:youtube', timeoutMs: 9_000 });
|
||||
assert.equal(requests[12].timeoutMs, 19_000);
|
||||
assert.deepEqual(requests[14].body, { role: 'reserve' });
|
||||
});
|
||||
|
||||
test('connectivity diagnostics expose a retryable domain error', async () => {
|
||||
|
||||
Reference in New Issue
Block a user