From 6cc380d8ce631237f169dea15575bc99b43573b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Mon, 25 Aug 2025 20:40:15 +0200 Subject: [PATCH] test: Remove meta test case wait It is now redundant, check has been moved to attach in Env. --- test/case/all.yaml | 4 +--- test/case/meta/wait.py | 49 ------------------------------------------ 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100755 test/case/meta/wait.py diff --git a/test/case/all.yaml b/test/case/all.yaml index 3db38337..22cbecec 100644 --- a/test/case/all.yaml +++ b/test/case/all.yaml @@ -2,12 +2,10 @@ - settings: test-spec: Readme.adoc -- case: meta/wait.py - infamy: - specification: False - case: meta/reproducible.py infamy: specification: False + - name: Misc tests suite: misc/misc.yaml diff --git a/test/case/meta/wait.py b/test/case/meta/wait.py deleted file mode 100755 index 8d38c55c..00000000 --- a/test/case/meta/wait.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 - -import time -import infamy -import infamy.neigh - - -TIMEOUT = 300 - - -def ll6ping(node): - cport, nport = env.ptop.get_mgmt_link(ctrl, node) - neigh = infamy.neigh.ll6ping(cport, flags=["-w1", "-c1", "-L", "-n"]) - if neigh: - print(f"Found {neigh} on {cport} (connected to {node}:{nport})") - return neigh - - return None - - -def is_reachable(node, env): - neigh = ll6ping(node) - if not neigh: - return False - - return infamy.util.is_reachable(neigh, env, env.ptop.get_password(node)) - - -with infamy.Test() as test: - with test.step("Initialize"): - # The test is designed to be run on a physical topology. - env = infamy.Env(ltop=False) - - ctrl = env.ptop.get_ctrl() - infixen = env.ptop.get_infixen() - - with test.step(f"Reach {infixen}"): - print(f"Waiting for {infixen} to come up, timeout: {TIMEOUT / 60} min") - timeout = time.time() + TIMEOUT - - while infixen and time.time() < timeout: - time.sleep(1) - infixen = [node for node in infixen if not is_reachable(node, env)] - - if infixen: - print(f"Unable to reach {infixen}") - test.fail() - - test.succeed()