Add runtime version reporting and display
This commit is contained in:
@@ -6,11 +6,19 @@ test('control uses the dataplane socket protocol', async () => {
|
||||
const requests = [];
|
||||
const send = async (socketPath, pathname, method) => {
|
||||
requests.push(`${method} ${pathname} ${socketPath}`);
|
||||
return { running: pathname !== '/stop', startedAt: 'now' };
|
||||
return {
|
||||
running: pathname !== '/stop',
|
||||
startedAt: 'now',
|
||||
gatewayBackendVersion: '0.1.0',
|
||||
singBoxVersion: '1.12.13',
|
||||
};
|
||||
};
|
||||
|
||||
const client = createDataplaneClient('/run/dataplane.sock', send);
|
||||
assert.equal((await client.refresh()).running, true);
|
||||
const status = await client.refresh();
|
||||
assert.equal(status.running, true);
|
||||
assert.equal(status.gatewayBackendVersion, '0.1.0');
|
||||
assert.equal(status.singBoxVersion, '1.12.13');
|
||||
await client.apply();
|
||||
await client.restart();
|
||||
assert.equal((await client.stop()).running, false);
|
||||
|
||||
Reference in New Issue
Block a user