-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lambda): use artillery-hosted ECR image (#2724)
* feat(lambda): use artillery-hosted ECR image * test(lambda): add a smoke test for container lambda * fix(lambda): use old naming to maintain iam backwards compatibility * fix(lambda): use correct ECR repo
- Loading branch information
1 parent
81717f9
commit 129c69a
Showing
5 changed files
with
65 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/artillery/test/cloud-e2e/lambda/fixtures/quick-loop-with-csv/blitz.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
scenarios: | ||
- flow: | ||
- beforeScenario: emitCsvCounters | ||
flow: | ||
- loop: | ||
- get: | ||
url: "/dino" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/artillery/test/cloud-e2e/lambda/run-lambda-container.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const tap = require('tap'); | ||
const { $ } = require('zx'); | ||
const { getTestTags } = require('../../cli/_helpers.js'); | ||
|
||
tap.test('Run a test on AWS Lambda using containers', async (t) => { | ||
const tags = getTestTags(['type:acceptance']); | ||
const configPath = `${__dirname}/fixtures/quick-loop-with-csv/config.yml`; | ||
const scenarioPath = `${__dirname}/fixtures/quick-loop-with-csv/blitz.yml`; | ||
|
||
process.env.LAMBDA_IMAGE_VERSION = process.env.ECR_IMAGE_VERSION; | ||
|
||
const output = | ||
await $`artillery run-lambda --count 10 --region us-east-1 --container --config ${configPath} --record --tags ${tags} ${scenarioPath}`; | ||
|
||
t.equal(output.exitCode, 0, 'CLI should exit with code 0'); | ||
|
||
t.ok( | ||
output.stdout.indexOf('Summary report') > 0, | ||
'Should print summary report' | ||
); | ||
t.ok( | ||
output.stdout.indexOf('http.codes.200') > 0, | ||
'Should print http.codes.200' | ||
); | ||
|
||
t.ok( | ||
output.stdout.indexOf('csv_number_') > 0, | ||
'Should print csv_number_ counters' | ||
); | ||
|
||
t.ok( | ||
output.stdout.indexOf('csv_name_') > 0, | ||
'Should print csv_name_ counters' | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters