tests - disable copying bw-data files for k8s and swarm tests

This commit is contained in:
bunkerity 2022-07-20 11:57:26 +02:00
parent 0ee09d47da
commit 6e381ee028
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
2 changed files with 10 additions and 8 deletions

View File

@ -94,10 +94,10 @@ class KubernetesTest(Test) :
proc = run("sudo ./setup-kubernetes.sh", cwd=test, shell=True)
if proc.returncode != 0 :
raise(Exception("setup-kubernetes failed"))
if isdir(example_data) :
for cp_dir in listdir(example_data) :
if isdir(join(example_data, cp_dir)) :
copytree(join(example_data, cp_dir), join("/tmp/bw-data", cp_dir))
# if isdir(example_data) :
# for cp_dir in listdir(example_data) :
# if isdir(join(example_data, cp_dir)) :
# copytree(join(example_data, cp_dir), join("/tmp/bw-data", cp_dir))
proc = run("sudo kubectl apply -f kubernetes.yml", shell=True, cwd=test)
if proc.returncode != 0 :
raise(Exception("kubectl apply failed"))

View File

@ -82,10 +82,12 @@ class SwarmTest(Test) :
proc = run("sudo ./setup-swarm.sh", cwd=test, shell=True)
if proc.returncode != 0 :
raise(Exception("setup-swarm failed"))
if isdir(example_data) :
for cp_dir in listdir(example_data) :
if isdir(join(example_data, cp_dir)) :
copytree(join(example_data, cp_dir), join("/tmp/bw-data", cp_dir))
# if isdir(example_data) :
# for cp_dir in listdir(example_data) :
# if isdir(join(example_data, cp_dir)) :
# if isdir(join("/tmp/bw-data", cp_dir)) :
# run("sudo rm -rf " + join("/tmp/bw-data", cp_dir), shell=True)
# copytree(join(example_data, cp_dir), join("/tmp/bw-data", cp_dir))
proc = run('docker stack deploy -c swarm.yml "' + self._name + '"', shell=True, cwd=test)
if proc.returncode != 0 :
raise(Exception("docker stack deploy failed"))