From ed0c0efc14737700b06a68c755ca02956a7665b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Mart=C3=ADn?= Date: Wed, 9 Oct 2024 14:22:32 +0200 Subject: [PATCH] test: simplify the code checking FDO services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify the code checking the FDO servers availability Signed-off-by: Miguel Martín --- test/fmf/tests/onboarding/run-onboarding.sh | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/test/fmf/tests/onboarding/run-onboarding.sh b/test/fmf/tests/onboarding/run-onboarding.sh index 3afb4140d..98bdb785c 100755 --- a/test/fmf/tests/onboarding/run-onboarding.sh +++ b/test/fmf/tests/onboarding/run-onboarding.sh @@ -197,21 +197,11 @@ setup_rendezvous setup_serviceinfo systemctl restart fdo-{manufacturing,owner-onboarding,rendezvous,serviceinfo-api}-server.service # Wait for servers to be up and running -until [ "$(curl -X POST http://${PRIMARY_IP}:8080/ping)" == "pong" ]; do - sleep 1; -done; - -until [ "$(curl -X POST http://${PRIMARY_IP}:8081/ping)" == "pong" ]; do - sleep 1; -done; - -until [ "$(curl -X POST http://${PRIMARY_IP}:8082/ping)" == "pong" ]; do - sleep 1; -done; - -until [ "$(curl -X POST http://${PRIMARY_IP}:8083/ping)" == "pong" ]; do - sleep 1; -done; +for PORT in 808{0..3}; do + until [ "$(curl -s -X POST http://${PRIMARY_IP}:${PORT}/ping)" == "pong" ]; do + sleep 1; + done; +done perform_no_plain_di [ "${OV_STORE_DRIVER}" = "Directory" ] || export_import_vouchers sleep 60