mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Print warning if deprecated --include-python flag is given
This commit is contained in:
parent
6beb962282
commit
037a83e1ff
5 changed files with 109 additions and 2 deletions
45
test/e2e/include-python-deprecation.e2e.spec.js
Normal file
45
test/e2e/include-python-deprecation.e2e.spec.js
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { describe, it, before, beforeEach, afterEach } from "node:test";
|
||||
import { DockerTestContainer } from "./DockerTestContainer.js";
|
||||
import assert from "node:assert";
|
||||
|
||||
describe("E2E: deprecated --include-python handling", () => {
|
||||
let container;
|
||||
|
||||
before(async () => {
|
||||
DockerTestContainer.buildImage();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
container = new DockerTestContainer();
|
||||
await container.start();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
if (container) {
|
||||
await container.stop();
|
||||
container = null;
|
||||
}
|
||||
});
|
||||
|
||||
for (let shell of ["bash", "zsh"]) {
|
||||
it(`safe-chain setup warns and continues for ${shell}`, async () => {
|
||||
const sh = await container.openShell(shell);
|
||||
const result = await sh.runCommand("safe-chain setup --include-python");
|
||||
|
||||
assert.ok(
|
||||
result.output.toLowerCase().includes("deprecated and ignored"),
|
||||
`Expected warning about deprecated --include-python. Output was:\n${result.output}`
|
||||
);
|
||||
});
|
||||
|
||||
it(`safe-chain setup-ci warns and continues for ${shell}`, async () => {
|
||||
const sh = await container.openShell(shell);
|
||||
const result = await sh.runCommand("safe-chain setup-ci --include-python");
|
||||
|
||||
assert.ok(
|
||||
result.output.toLowerCase().includes("deprecated and ignored"),
|
||||
`Expected warning about deprecated --include-python. Output was:\n${result.output}`
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue