mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(ql3): expose cancellation status card
This commit is contained in:
@@ -15,6 +15,7 @@ const { afterEach, test } = require('node:test');
|
||||
|
||||
const {
|
||||
executeClusterRunManagementClient,
|
||||
executeClusterRunManagementCommand,
|
||||
validateClusterRunManagementClientResult,
|
||||
} = require('@qinglong/cluster-admin/run-management-client');
|
||||
const {
|
||||
@@ -217,6 +218,32 @@ test('accepts only the exact Run route before opening one mTLS connection', asyn
|
||||
assert.equal(connects, 1);
|
||||
});
|
||||
|
||||
test('accepts a normalized in-memory summary command without a command file', async () => {
|
||||
const paths = clientFiles();
|
||||
let connects = 0;
|
||||
await assert.rejects(
|
||||
executeClusterRunManagementCommand(
|
||||
{
|
||||
configFile: paths.configFile,
|
||||
assertionFile: paths.assertionFile,
|
||||
command: summaryCommand,
|
||||
},
|
||||
{
|
||||
async connect(target) {
|
||||
connects += 1;
|
||||
assert.deepEqual(target, {
|
||||
hostname: 'run.example.test',
|
||||
port: 8448,
|
||||
});
|
||||
throw new Error('expected-connect-stop');
|
||||
},
|
||||
},
|
||||
),
|
||||
{ code: 'QL3_PLUGIN_PACKAGE_MANAGEMENT_CLIENT_REQUEST_FAILED' },
|
||||
);
|
||||
assert.equal(connects, 1);
|
||||
});
|
||||
|
||||
test('rejects response target, execution placement and shape drift', () => {
|
||||
for (const candidate of [
|
||||
response({ projectId: 'project-2' }),
|
||||
|
||||
Reference in New Issue
Block a user