Skip to content

Commit 1fb5d08

Browse files
authored
Decouple subject_root and kubeconfig variables, resolving #837 (#884)
Signed-off-by: Matthias Büchse <[email protected]>
1 parent f2333f1 commit 1fb5d08

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ specified in `clouds.yaml`.
3636
Given a kubeconfig file `path/to/kubeconfig.yaml`, run
3737

3838
```shell
39-
./scs-compliance-check.py -v -a kubeconfig=path/to/kubeconfig.yaml -s SUBJECT scs-compatible-kaas.yaml
39+
./scs-compliance-check.py -v -a kubeconfig=path/to/kubeconfig.yaml -a subject_root=. -s SUBJECT scs-compatible-kaas.yaml
4040
```
4141

4242
Replace `SUBJECT` with an arbitrary, but meaningful subject name.
@@ -88,7 +88,7 @@ docker run -v ~/.config/openstack:/root/.config/openstack:ro scs-compliance-chec
8888
For KaaS:
8989

9090
```shell
91-
docker run -v /path/to/kubeconfig.yaml:/root/kubeconfig.yaml:ro scs-compliance-check -a kubeconfig=/root/kubeconfig.yaml -s SUBJECT scs-compatible-kaas.yaml
91+
docker run -v /path/to/kubeconfig.yaml:/root/kubeconfig.yaml:ro scs-compliance-check -a kubeconfig=/root/kubeconfig.yaml -a subject_root=. -s SUBJECT scs-compatible-kaas.yaml
9292
```
9393

9494
If you want to test against a cluster running on localhost (e.g., kind cluster), replace

Tests/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ spec = "./scs-compatible-kaas.yaml"
5959
[subjects._.mapping]
6060
os_cloud = "{subject}"
6161
subject_root = "{subject}"
62+
# NOTE: this kubeconfig cannot be deviated from when using scs-test-runner.py
63+
kubeconfig = "{subject}/kubeconfig.yaml"
6264

6365

6466
[subjects._.kubernetes_setup]

Tests/scs-compatible-kaas.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ uuid: 1fffebe6-fd4b-44d3-a36c-fc58b4bb0180
33
url: https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Tests/scs-compatible-kaas.yaml
44
variables:
55
- subject_root
6-
# directory containing the kubeconfig file for the subject under test
6+
# working directory for the subject under test
77
# (note that we consider each kubernetes branch a test subject of its own)
8+
- kubeconfig
89
modules:
910
- id: cncf-k8s-conformance
1011
name: CNCF Kubernetes conformance
1112
url: https://github.com/cncf/k8s-conformance/tree/master
1213
run:
1314
- executable: ./kaas/sonobuoy_handler/run_sonobuoy.py
14-
args: -k {subject_root}/kubeconfig.yaml -r {subject_root}/sono-results -c 'cncf-k8s-conformance' -a '--mode=certified-conformance'
15-
#~ args: -k {subject_root}/kubeconfig.yaml -r {subject_root}/sono-results -c 'cncf-k8s-conformance' -a '--plugin-env e2e.E2E_DRYRUN=true'
15+
args: -k {kubeconfig} -r {subject_root}/sono-results -c 'cncf-k8s-conformance' -a '--mode=certified-conformance'
16+
#~ args: -k {kubeconfig} -r {subject_root}/sono-results -c 'cncf-k8s-conformance' -a '--plugin-env e2e.E2E_DRYRUN=true'
1617
testcases:
1718
- id: cncf-k8s-conformance
1819
tags: [mandatory]
@@ -23,7 +24,7 @@ modules:
2324
url: https://docs.scs.community/standards/scs-0210-v2-k8s-version-policy
2425
run:
2526
- executable: ./kaas/k8s-version-policy/k8s_version_policy.py
26-
args: -k {subject_root}/kubeconfig.yaml
27+
args: -k {kubeconfig}
2728
testcases:
2829
- id: version-policy-check
2930
tags: [mandatory]
@@ -34,7 +35,7 @@ modules:
3435
url: https://docs.scs.community/standards/scs-0214-v2-k8s-node-distribution
3536
run:
3637
- executable: ./kaas/k8s-node-distribution/k8s_node_distribution_check.py
37-
args: -k {subject_root}/kubeconfig.yaml
38+
args: -k {kubeconfig}
3839
testcases:
3940
- id: node-distribution-check
4041
tags: [mandatory]
@@ -45,7 +46,7 @@ modules:
4546
url: https://docs.scs.community/standards/scs-0219-v1-kaas-networking
4647
run:
4748
- executable: ./kaas/sonobuoy_handler/run_sonobuoy.py
48-
args: -k {subject_root}/kubeconfig.yaml -r {subject_root}/sono-results -c 'kaas-networking-check' -a '--e2e-focus "NetworkPolicy"'
49+
args: -k {kubeconfig} -r {subject_root}/sono-results -c 'kaas-networking-check' -a '--e2e-focus "NetworkPolicy"'
4950
testcases:
5051
- id: kaas-networking-check
5152
tags: [mandatory]

0 commit comments

Comments
 (0)