Skip to content

Commit 9cde765

Browse files
committed
Fix broken import
1 parent 1d7b9a3 commit 9cde765

3 files changed

Lines changed: 80 additions & 3 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ local-cpsu:
3636
./scripts/test_cpsu_load_test.sh
3737

3838
local-psu:
39-
./scripts/test_psu_load_test.sh
39+
./scripts/test_psu_load_test.sh
40+
41+
local-notify:
42+
./scripts/test_notify_load_test.sh

artillery/notify_entrypoint.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {v4 as uuidv4} from "uuid"
22
import pino from "pino"
3-
import {getSharedAuthToken, getBody} from "./psu_entrypoint.mjs"
4-
import {allowedOdsCodes} from "./allowed_odsCodes.js"
3+
import {getSharedAuthToken, getBody} from "./helper/psu.mjs"
4+
import {allowedOdsCodes} from "./helper/allowed_odscodes.mjs"
55

66
const logger = pino()
77

scripts/test_notify_load_test.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
3+
4+
if [ -z "${environment}" ]; then
5+
echo "environment is unset or set to the empty string"
6+
exit 1
7+
fi
8+
9+
if [ -z "${maxVusers}" ]; then
10+
echo "maxVusers is unset or set to the empty string"
11+
exit 1
12+
fi
13+
14+
if [ -z "${duration}" ]; then
15+
echo "duration is unset or set to the empty string"
16+
exit 1
17+
fi
18+
19+
if [ -z "${arrivalRate}" ]; then
20+
echo "arrivalRate is unset or set to the empty string"
21+
exit 1
22+
fi
23+
24+
if [ -z "${rampUpDuration}" ]; then
25+
echo "rampUpDuration is unset or set to the empty string"
26+
exit 1
27+
fi
28+
29+
if [ -z "${psu_api_key}" ]; then
30+
echo "psu_api_key is unset or set to the empty string"
31+
exit 1
32+
fi
33+
34+
if [ -z "${psu_private_key}" ]; then
35+
echo "psu_private_key is unset or set to the empty string"
36+
exit 1
37+
fi
38+
39+
if [ -z "${psu_kid}" ]; then
40+
echo "psu_kid is unset or set to the empty string"
41+
exit 1
42+
fi
43+
44+
45+
# Create a dotenv file with the variables for Artillery
46+
cat <<EOF > runtimeenv.env
47+
maxVusers=${maxVusers}
48+
duration=${duration}
49+
arrivalRate=${arrivalRate}
50+
rampUpDuration=${rampUpDuration}
51+
psu_api_key="${psu_api_key}"
52+
psu_private_key="${psu_private_key}"
53+
psu_kid="${psu_kid}"
54+
EOF
55+
56+
echo "Running Artillery test locally..."
57+
echo ""
58+
echo "Max Virtual Users: ${maxVusers}"
59+
echo "Phase Duration: ${duration}"
60+
echo "Arrival Rate: ${arrivalRate}"
61+
echo "Ramp Up Duration: ${rampUpDuration}"
62+
echo ""
63+
64+
set -e
65+
66+
# Run the Artillery test locally
67+
npx artillery run \
68+
-e "${environment}" \
69+
--dotenv /workspaces/eps-load-test/runtimeenv.env \
70+
--output /workspaces/eps-load-test/notify_load_test.json \
71+
/workspaces/eps-load-test/artillery/notify_load_test.yml
72+
73+
# Generate a report from the test results
74+
npx /workspaces/eps-load-test/artillery report notify_load_test.json

0 commit comments

Comments
 (0)