mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
tests - replace python cp with sudo cp
This commit is contained in:
parent
6d06a32cc9
commit
a607bd67cb
2 changed files with 6 additions and 12 deletions
|
@ -90,12 +90,9 @@ class AutoconfTest(Test) :
|
|||
if proc.returncode != 0 :
|
||||
raise(Exception("setup-autoconf failed"))
|
||||
if isdir(example_data) :
|
||||
proc = run("sudo ls " + example_data, shell=True, capture_output=True)
|
||||
for cp_dir in proc.stdout.decode().splitlines() :
|
||||
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("sudo cp -rp " + example_data + "/* /tmp/bw-data", shell=True)
|
||||
if proc.returncode != 0 :
|
||||
raise(Exception("cp bw-data failed"))
|
||||
proc = run("docker-compose -f autoconf.yml pull", shell=True, cwd=test)
|
||||
if proc.returncode != 0 :
|
||||
raise(Exception("docker-compose pull failed"))
|
||||
|
|
|
@ -49,12 +49,9 @@ class DockerTest(Test) :
|
|||
if proc.returncode != 0 :
|
||||
raise(Exception("setup-docker failed"))
|
||||
if isdir(example_data) :
|
||||
proc = run("sudo ls " + example_data, shell=True, capture_output=True)
|
||||
for cp_dir in proc.stdout.decode().splitlines() :
|
||||
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("sudo cp -rp " + example_data + "/* /tmp/bw-data", shell=True)
|
||||
if proc.returncode != 0 :
|
||||
raise(Exception("cp bw-data failed"))
|
||||
proc = run("docker-compose pull", shell=True, cwd=test)
|
||||
if proc.returncode != 0 :
|
||||
raise(Exception("docker-compose pull failed"))
|
||||
|
|
Loading…
Reference in a new issue