From edbc28a48bce406c4db64330212ad8eeaeee47d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Mon, 25 Aug 2025 16:47:09 +0200 Subject: [PATCH] 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. --- .../case/infix_containers/container_host_commands/test.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/case/infix_containers/container_host_commands/test.py b/test/case/infix_containers/container_host_commands/test.py index c7ee45df..f2dbe912 100755 --- a/test/case/infix_containers/container_host_commands/test.py +++ b/test/case/infix_containers/container_host_commands/test.py @@ -75,11 +75,5 @@ nsenter -m/1/ns/mnt -u/1/ns/uts -i/1/ns/ipc -n/1/ns/net hostname {hostname_new} until(lambda: c.running(cont_name), attempts=10) with test.step("Verify the new hostname set by the container"): - oper = target.get_data("/ietf-system:system") - name = oper["system"]["hostname"] - - if name != hostname_new: - print(f"Expected hostname: {hostname_new}, actual hostname: {name}") - test.fail() - + until(lambda: c.running(cont_name) != target.get_data("/ietf-system:system")["system"]["hostname"], attempts=10) test.succeed()