Skip to content
Snippets Groups Projects
Commit 78eb877b authored by Luis Contreras's avatar Luis Contreras
Browse files

Fixing test_default file

parent d62924f3
No related branches found
No related tags found
1 merge request!11Infra 5311
Pipeline #122625 failed
......@@ -31,22 +31,65 @@ def test_settings(host):
def test_opis_repositories(host):
for filename in (
"/usr/local/share/cs-studio/ess-opis/README.md",
"/data/opis-pbi/opis-pbi-systemexpert/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/99-PBI/README.md",
"/data/opis-pbi/30-Operator/10-ACC/99-PBI/README.md",
"/data/opis-pbi/20-SystemExpert/10-ACC/999-Cryo/README.md",
if (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-phoebus-default"
):
assert host.file(filename).exists
cmd = host.run("cd /data/opis-pbi/opis-pbi-systemexpert;git rev-parse HEAD")
assert cmd.stdout.strip() == "1d34327ea88a12fec5e64c38839e038361e0a660"
for filename in (
"/usr/local/share/cs-studio/ess-opis/README.md",
"/data/opis-pbi/opis-pbi-systemexpert/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/99-PBI/README.md",
"/data/opis-pbi/30-Operator/10-ACC/99-PBI/README.md",
"/data/opis-pbi/20-SystemExpert/10-ACC/999-Cryo/README.md",
):
assert host.file(filename).exists
cmd = host.run("cd /data/opis-pbi/opis-pbi-systemexpert;git rev-parse HEAD")
assert cmd.stdout.strip() == "1d34327ea88a12fec5e64c38839e038361e0a660"
elif (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-phoebus-ubuntu"
):
for filename in (
"/usr/local/share/cs-studio/ess-opis/README.md",
"/data/opis-pbi/opis-pbi-systemexpert/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/99-PBI/README.md",
"/data/opis-pbi/30-Operator/10-ACC/99-PBI/README.md",
"/data/opis-pbi/20-SystemExpert/10-ACC/999-Cryo/README.md",
):
assert host.file(filename).exists
cmd = host.run("cd /data/opis-pbi/opis-pbi-systemexpert;git rev-parse HEAD")
assert cmd.stdout.strip() == "1d34327ea88a12fec5e64c38839e038361e0a660"
else:
for filename in (
"/data/opis-pbi/10-Engineer/10-ACC/99-PBI/README.md",
):
assert host.file(filename).exists
cmd = host.run("cd /data/opis-pbi/10-Engineer/10-ACC/99-PBI;git rev-parse HEAD")
assert cmd.stdout.strip() == "fd19d4765d8cee0480f2bfa86efb72e1051fad69"
def test_opis_repositories_are_deleted(host):
for filename in (
"/data/opis-pbi/20-SystemExpert/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/30-Operator/10-ACC/000-Ops/README.md",
if (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-phoebus-default"
):
for filename in (
"/data/opis-pbi/20-SystemExpert/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/30-Operator/10-ACC/000-Ops/README.md",
):
assert host.file(filename).exists is False
elif (
host.ansible.get_variables()["inventory_hostname"]
== "ics-ans-role-phoebus-ubuntu"
):
assert host.file(filename).exists is False
for filename in (
"/data/opis-pbi/20-SystemExpert/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/10-Engineer/10-ACC/999-TS2/99-RF/README.md",
"/data/opis-pbi/30-Operator/10-ACC/000-Ops/README.md",
):
assert host.file(filename).exists is False
else:
for filename in (
"/data/opis-pbi/10-Engineer/10-ACC/99-PBI/README.md",
):
assert host.file(filename).exists is False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment