Skip to content

Commit

Permalink
Fix tentat egress rules.
Browse files Browse the repository at this point in the history
Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Aug 13, 2024
1 parent ec4f839 commit e708bcb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions container_ci_suite/openshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ def create_egress_rules(self) -> bool:
try:
tentant_output = run_oc_command(cmd=f"apply -f {tenant_egress_file}", json_output=False, return_output=True)
print(tentant_output)
except subprocess.CalledProcessError:
print(f"Apply egress rules to tenant namespace '{self.shared_random_name}' was not successful.")
self.delete_tenant_namespace()
except subprocess.CalledProcessError as cpe:
print(f"Apply egress rules to tenant namespace '{self.shared_random_name}' was not successful. {cpe}")
return False
return True

Expand All @@ -111,8 +110,7 @@ def prepare_tenant_namespace(self):
return False
# Let's wait 3 seconds till project is not up
time.sleep(3)
if not self.create_egress_rules():
return False
self.create_egress_rules()
run_oc_command(
cmd=f"project {self.namespace}",
json_output=json_flag,
Expand Down

0 comments on commit e708bcb

Please sign in to comment.