mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(ql3): expose worker observations in console
This commit is contained in:
@@ -137,6 +137,25 @@ test('adds optional Run management files only after an explicit enabled switch',
|
||||
);
|
||||
});
|
||||
|
||||
test('adds optional Worker management files only after its independent enabled switch', (t) => {
|
||||
const value = fixture(t);
|
||||
const result = invoke('check', {
|
||||
...value.env,
|
||||
QL3_COPILOT_CONSOLE_WORKER_MANAGEMENT: 'enabled',
|
||||
});
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
const args = fs.readFileSync(value.capture, 'utf8').trimEnd().split('\n');
|
||||
assert.equal(
|
||||
args[args.indexOf('--worker-management-config') + 1],
|
||||
'/var/run/secrets/qinglong3/copilot-console/worker-management-client.json',
|
||||
);
|
||||
assert.equal(
|
||||
args[args.indexOf('--worker-management-assertion') + 1],
|
||||
'/var/run/secrets/qinglong3/copilot-console/worker-management-assertion.jwt',
|
||||
);
|
||||
assert.equal(args.includes('--run-management-config'), false);
|
||||
});
|
||||
|
||||
test('rejects mutable, ambient and malformed host inputs before Docker', (t) => {
|
||||
const value = fixture(t);
|
||||
for (const environment of [
|
||||
@@ -149,6 +168,7 @@ test('rejects mutable, ambient and malformed host inputs before Docker', (t) =>
|
||||
},
|
||||
{ ...value.env, QL3_COPILOT_CONSOLE_RESOURCE_CLASS: 'unbounded' },
|
||||
{ ...value.env, QL3_COPILOT_CONSOLE_RUN_MANAGEMENT: 'ambient' },
|
||||
{ ...value.env, QL3_COPILOT_CONSOLE_WORKER_MANAGEMENT: 'ambient' },
|
||||
]) {
|
||||
const rejected = invoke('serve', environment);
|
||||
assert.equal(rejected.status, 78);
|
||||
|
||||
Reference in New Issue
Block a user