Skip to content

Commit 8b54d4c

Browse files
committed
test(load): pass BASE_URL as flag instead
[ci-skip]
1 parent d7cde19 commit 8b54d4c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/run-k6-load-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,4 @@ jobs:
4646
cloud: ${{ github.event.inputs.cloud }}
4747
token: ${{ secrets.K6_CLOUD_API_TOKEN }}
4848
filename: ${{ github.event.inputs.filename }}
49-
flags: ${{ github.event.inputs.flags }}
50-
env:
51-
BASE_URL: ${{ github.event.inputs.environment }}
49+
flags: -e BASE_URL=${github.event.inputs.environment} ${{ github.event.inputs.flags }}

packages/theme/tests/load/searchProduct.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export const options = {
2222

2323
const { BASE_URL } = __ENV;
2424

25+
if (BASE_URL === undefined) {
26+
throw new Error('BASE_URL is not set');
27+
}
28+
2529
export default function main() {
2630
let response;
2731

0 commit comments

Comments
 (0)