forked from eshepelyuk/cmak-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
55 lines (40 loc) · 1.12 KB
/
justfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
export E2E_TEST := "default"
default:
@just --list
test-lint:
./test/linter/test.sh
test-unit:
helm plugin ls | grep unittest || helm plugin install https://github.com/quintush/helm-unittest
helm unittest -f 'test/unit/*.yaml' -3 .
test: test-lint test-unit
_skaffold-ctx:
skaffold config set default-repo localhost:5000
# (re) create local k8s cluster using k3d
k3d: _chk-py && _skaffold-ctx
#!/usr/bin/env bash
set -euxo pipefail
k3d cluster rm cmak-operator || true
k3d cluster create --config ./test/e2e/k3d.yaml
source .venv/bin/activate
pytest --capture=tee-sys -p no:warnings test/e2e/traefik.py
# install into local k8s
up: _skaffold-ctx down
skaffold run
# remove from local k8s
down:
skaffold delete || true
_chk-py:
#!/usr/bin/env bash
set -euxo pipefail
if [ ! -d .venv ]; then
python3 -mvenv .venv
pip3 install -r test/e2e/requirements.txt
fi
# run only e2e test script
test-e2e-sh: _chk-py
#!/usr/bin/env bash
set -euxo pipefail
source .venv/bin/activate
pytest --capture=tee-sys -p no:warnings test/e2e/{{E2E_TEST}}/test.py
# run single e2e test
test-e2e: up test-e2e-sh