-
Notifications
You must be signed in to change notification settings - Fork 315
/
e2e_local.sh
executable file
·38 lines (33 loc) · 1.27 KB
/
e2e_local.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -euo pipefail
channel=${1:?You must specify a channel value}
# If no `$test_name` is specified then after the test setup you will be dropped into an interactive bash
# prompt. From there you can run `pwsh .expeditor/scripts/end_to_end/run_e2e_test_core.ps1 $test_name`
# to quickly iterate on tests.
test_name=${2:-}
echo ".expeditor/scripts/end_to_end/run_e2e_test.sh '$channel' '$test_name'"
# Note: the Docker socket is added just for testing docker export
# functionality locally.
if [ -n "$test_name" ]; then
docker run \
--rm \
--interactive \
--tty \
--privileged \
--env-file="$(pwd)/e2e_env" \
--volume="$(pwd):/workdir" \
--workdir=/workdir \
-v /var/run/docker.sock:/var/run/docker.sock \
chefes/buildkite bash -c ".expeditor/scripts/end_to_end/run_e2e_test.sh $channel $test_name"
else
docker run \
--rm \
--interactive \
--tty \
--privileged \
--env-file="$(pwd)/e2e_env" \
--volume="$(pwd):/workdir" \
--workdir=/workdir \
-v /var/run/docker.sock:/var/run/docker.sock \
chefes/buildkite bash -c ".expeditor/scripts/end_to_end/run_e2e_test.sh $channel"
fi