Skip to content

Commit

Permalink
feat(cli): expose --variables flag in fargate (#2391)
Browse files Browse the repository at this point in the history
* feat(cli): expose --variables flag in fargate

* refactor(cli): move --variables to common flags
  • Loading branch information
bernardobridge committed Jan 2, 2024
1 parent aec0b89 commit 7f1d779
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
5 changes: 5 additions & 0 deletions packages/artillery/lib/cli/common-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const CommonRunFlags = {
dotenv: Flags.string({
description: 'Path to a dotenv file to load environment variables from'
}),
variables: Flags.string({
char: 'v',
description:
'Set variables available to vusers during the test; a JSON object'
}),
overrides: Flags.string({
description: 'Dynamically override values in the test script; a JSON object'
}),
Expand Down
5 changes: 0 additions & 5 deletions packages/artillery/lib/cmds/run-lambda.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ Examples:
`;
RunLambdaCommand.flags = {
...CommonRunFlags,
variables: Flags.string({
char: 'v',
description:
'Set variables available to vusers during the test; a JSON object'
}),
payload: Flags.string({
char: 'p',
description: 'Specify a CSV file for dynamic data'
Expand Down
5 changes: 0 additions & 5 deletions packages/artillery/lib/cmds/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ RunCommand.flags = {
char: 'q',
description: 'Quiet mode'
}),
variables: Flags.string({
char: 'v',
description:
'Set variables available to vusers during the test; a JSON object'
}),
// TODO: Deprecation notices for commands below:
payload: Flags.string({
char: 'p',
Expand Down
3 changes: 3 additions & 0 deletions packages/artillery/lib/platform/aws-ecs/legacy/run-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,9 @@ async function generateTaskOverrides(context) {
context.cliOptions.overrides
? ['--overrides', context.cliOptions.overrides]
: [],
context.cliOptions.variables
? ['--variables', context.cliOptions.variables]
: [],
context.configPath ? ['--config', context.configPath] : []
);
// NOTE: This MUST come last:
Expand Down

0 comments on commit 7f1d779

Please sign in to comment.