From f8fee02c87142b28a7917bd347fabc284f591de1 Mon Sep 17 00:00:00 2001 From: Girdhari Yadav Date: Thu, 22 Jan 2026 16:36:18 +0000 Subject: [PATCH] ci: 100-captiveportal.t: fix intermittent failure by checking State instead of Status Problem: CRAM test for the CaptivePortal module was failing on OpenWrt 24.10. Cause: Cram test expected HTTP 307 Temporary Redirect, but occasionally received 200 OK due to a timing issue while openNDS was starting to intercept traffic. Solution: Added a 1-second delay and updated the test to verify CaptivePortal.State instead of CaptivePortal.Status, ensuring validation occurs only after openNDS is actively intercepting traffic. References: PCF-1943 Signed-off-by: Girdhari Yadav --- .../generic/acceleration-plan-components/100-captiveportal.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/tests/cram/generic/acceleration-plan-components/100-captiveportal.t b/.gitlab/tests/cram/generic/acceleration-plan-components/100-captiveportal.t index 5a252136e0..f9e39718ef 100644 --- a/.gitlab/tests/cram/generic/acceleration-plan-components/100-captiveportal.t +++ b/.gitlab/tests/cram/generic/acceleration-plan-components/100-captiveportal.t @@ -7,6 +7,7 @@ Enable Captive Portal (not activated by default): $ R "ba-cli 'CaptivePortal.Enable=1'" >/dev/null $ R "ba-cli 'CaptivePortal.Status?' | sed -n '2p'" CaptivePortal.Status="Enabled" + $ sleep 1 Disable WAN using IP datamodel and check that Captive Portal starts intercepting: @@ -20,8 +21,8 @@ Get a DHCP lease from the router (openNDS requires clients to be registered): Wait for status change: $ sleep 15 - $ R "ba-cli -lj 'ubus-protected;CaptivePortal.Status?'" 2>&1 | grep -v "^>" | sed -n "4p" - [{"CaptivePortal.":{"Status":"Enabled"}}] + $ R "ba-cli -lj 'ubus-protected;CaptivePortal.State?'" 2>&1 | grep -v "^>" | sed -n "4p" + [{"CaptivePortal.":{"State":"Running"}}] Check openNDS http interface has been opened on br-lan: