tests: k8s: Leave runtimeclass_workloads/ alone

Makes it so that `setup.sh` doesn't make changes in
`runtimeclass_workloads/` directly. Instead we treat that as a template
directory and we use the new directory `runtimeclass_workloads_work/` as
a work dir.

This has two advantages:

 * Allows rerunning tests without the assumption that `setup.sh` must be
   idempotent. E.g. the `set_runtime_class()` step would break.
 * Doesn't pollute your git environment with a bunch of changes when
   developing.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
Aurélien Bombo
2023-07-25 12:06:57 -07:00
parent bdde6aa948
commit d7f04a64a0
3 changed files with 11 additions and 4 deletions

View File

@@ -34,6 +34,6 @@ dragonball_limitations="https://github.com/kata-containers/kata-containers/issue
export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}"
get_pod_config_dir() {
pod_config_dir="${BATS_TEST_DIRNAME}/runtimeclass_workloads"
pod_config_dir="${BATS_TEST_DIRNAME}/runtimeclass_workloads_work"
info "k8s configured to use runtimeclass"
}