Skip to content

Commit edbc28a

Browse files
committed
test: container_host_commands: Test more than one time
Have been seen Occasionally in tests that hostname not have been set, try harder to check if it is set.
1 parent a60968b commit edbc28a

File tree

1 file changed

+1
-7
lines changed
  • test/case/infix_containers/container_host_commands

1 file changed

+1
-7
lines changed

test/case/infix_containers/container_host_commands/test.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,5 @@
7575
until(lambda: c.running(cont_name), attempts=10)
7676

7777
with test.step("Verify the new hostname set by the container"):
78-
oper = target.get_data("/ietf-system:system")
79-
name = oper["system"]["hostname"]
80-
81-
if name != hostname_new:
82-
print(f"Expected hostname: {hostname_new}, actual hostname: {name}")
83-
test.fail()
84-
78+
until(lambda: c.running(cont_name) != target.get_data("/ietf-system:system")["system"]["hostname"], attempts=10)
8579
test.succeed()

0 commit comments

Comments
 (0)