fix(ci): preserve console capacity helper input

This commit is contained in:
whyour
2026-08-22 14:11:35 +08:00
parent c8ad5ea368
commit 66668ffdcd
2 changed files with 8 additions and 0 deletions
@@ -816,11 +816,14 @@ function seedVolume(image, volume, root, files) {
[
'run',
'--rm',
'--interactive',
'--read-only',
'--network',
'none',
'--cap-drop',
'ALL',
'--cap-add',
'CHOWN',
'--security-opt',
'no-new-privileges',
'--user',
@@ -842,11 +845,14 @@ function rotateAssertion(image, volume, assertion) {
[
'run',
'--rm',
'--interactive',
'--read-only',
'--network',
'none',
'--cap-drop',
'ALL',
'--cap-add',
'CHOWN',
'--security-opt',
'no-new-privileges',
'--user',
@@ -397,6 +397,8 @@ test('live source freezes native cgroup v2, isolation and assertion rotation mec
]) {
assert.ok(scriptSource.includes(contract), `missing ${contract}`);
}
assert.equal(scriptSource.match(/'--interactive'/g)?.length, 2);
assert.equal(scriptSource.match(/'--cap-add',\n 'CHOWN'/g)?.length, 2);
assert.doesNotMatch(scriptSource, /run\.cancellation\.(?:rearm|stop|retry)/);
assert.doesNotMatch(scriptSource, /--privileged|--network[= ]host/);
});