Skip to content

Commit 2acb66a

Browse files
feat(lambda): remove --container flag (#2816)
1 parent acbbd3a commit 2acb66a

File tree

7 files changed

+8
-15
lines changed

7 files changed

+8
-15
lines changed

packages/artillery/lib/cmds/run-lambda.js

-7
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ RunLambdaCommand.flags = {
6060
// locally defaults to number of CPUs with mode = distribute
6161
default: '1'
6262
}),
63-
container: Flags.boolean({
64-
description: 'Use a container image for Lambda',
65-
deprecated: {
66-
message:
67-
'The --container flag has been deprecated. Container images are now the default mode for Lambda functions.'
68-
}
69-
}),
7063
architecture: Flags.string({
7164
description: 'Architecture of the Lambda function',
7265
default: 'arm64',

packages/artillery/lib/platform/aws-ecs/legacy/bom.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function getExtraFiles(context, next) {
377377
function getDotEnv(context, next) {
378378
const flags = context.opts.flags;
379379
//TODO: For now only enabled on Lambda. Enable this for Fargate after refactoring to allow for it
380-
if (!flags.dotenv || !flags.container || flags.platform !== 'aws:lambda') {
380+
if (!flags.dotenv || flags.platform !== 'aws:lambda') {
381381
return next(null, context);
382382
}
383383

packages/artillery/test/cloud-e2e/lambda/lambda-bom.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tap.test('Run simple-bom', async (t) => {
2121
const scenarioPath = `${__dirname}/../fargate/fixtures/simple-bom/simple-bom.yml`;
2222

2323
const output =
24-
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 -e test --tags ${tags} --output ${reportFilePath} --count 51 --record --container`;
24+
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 -e test --tags ${tags} --output ${reportFilePath} --count 51 --record`;
2525

2626
t.equal(output.exitCode, 0, 'CLI Exit Code should be 0');
2727

@@ -39,7 +39,7 @@ tap.test('Run mixed-hierarchy test in Lambda Container', async (t) => {
3939
const configPath = `${__dirname}/../fargate/fixtures/mixed-hierarchy/config/config-no-file-uploads.yml`;
4040

4141
const output =
42-
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 --config ${configPath} -e main --tags ${tags} --output ${reportFilePath} --record --container`;
42+
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 --config ${configPath} -e main --tags ${tags} --output ${reportFilePath} --record`;
4343

4444
const report = JSON.parse(fs.readFileSync(reportFilePath, 'utf8'));
4545

packages/artillery/test/cloud-e2e/lambda/lambda-dotenv.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tap.test('Run dotenv test in Lambda Container', async (t) => {
2121
const dotenvPath = `${__dirname}/fixtures/dotenv/.env-test`;
2222

2323
const output =
24-
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 --tags ${tags} --output ${reportFilePath} --count 5 --record --container --dotenv ${dotenvPath}`;
24+
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 --tags ${tags} --dotenv ${dotenvPath} --output ${reportFilePath} --count 5 --record`;
2525

2626
const report = JSON.parse(fs.readFileSync(reportFilePath, 'utf8'));
2727

packages/artillery/test/cloud-e2e/lambda/lambda-ensure.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tap.before(async () => {
1919

2020
tap.test('Lambda Container run uses ensure', async (t) => {
2121
try {
22-
await $`${A9_PATH} run-lambda ${__dirname}/../fargate/fixtures/uses-ensure/with-ensure.yaml --architecture x86_64 --container --tags ${tags} --output ${reportFilePath} --count 15`;
22+
await $`${A9_PATH} run-lambda ${__dirname}/../fargate/fixtures/uses-ensure/with-ensure.yaml --architecture x86_64 --tags ${tags} --output ${reportFilePath} --count 15`;
2323
t.fail(`Test "${t.name}" - Should have had non-zero exit code.`);
2424
} catch (output) {
2525
t.equal(output.exitCode, 1, 'CLI Exit Code should be 1');

packages/artillery/test/cloud-e2e/lambda/lambda-expect.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tap.test(
2020
'CLI should exit with non-zero exit code when there are failed expectations in container workers',
2121
async (t) => {
2222
try {
23-
await $`${A9_PATH} run-lambda ${__dirname}/../fargate/fixtures/cli-exit-conditions/with-expect.yml --architecture x86_64 --record --tags ${tags} --output ${reportFilePath} --container --count 2`;
23+
await $`${A9_PATH} run-lambda ${__dirname}/../fargate/fixtures/cli-exit-conditions/with-expect.yml --architecture x86_64 --record --tags ${tags} --output ${reportFilePath} --count 2`;
2424
t.fail(`Test "${t.name}" - Should have had non-zero exit code.`);
2525
} catch (output) {
2626
t.equal(output.exitCode, 1, 'CLI Exit Code should be 1');

packages/artillery/test/cloud-e2e/lambda/lambda-smoke.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tap.test('Run a test on AWS Lambda using containers', async (t) => {
2121
const scenarioPath = `${__dirname}/fixtures/quick-loop-with-csv/blitz.yml`;
2222

2323
const output =
24-
await $`${A9_PATH} run-lambda --count 10 --region us-east-1 --architecture x86_64 --container --config ${configPath} --record --tags ${tags} ${scenarioPath}`;
24+
await $`${A9_PATH} run-lambda --count 10 --region us-east-1 --architecture x86_64 --config ${configPath} --record --tags ${tags} ${scenarioPath}`;
2525

2626
t.equal(output.exitCode, 0, 'CLI should exit with code 0');
2727

@@ -51,7 +51,7 @@ tap.test(
5151
const scenarioPath = `${__dirname}/fixtures/ts-external-pkg/with-external-foreign-pkg.yml`;
5252

5353
const output =
54-
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 --container --record --output ${reportFilePath} --tags ${tags},typescript:true`;
54+
await $`${A9_PATH} run-lambda ${scenarioPath} --architecture x86_64 --record --output ${reportFilePath} --tags ${tags},typescript:true`;
5555

5656
t.equal(output.exitCode, 0, 'CLI Exit Code should be 0');
5757

0 commit comments

Comments
 (0)