From e4608f48a096d8d815974c511e4c45585d6d11d1 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Mon, 27 Jul 2026 21:04:54 +0800 Subject: [PATCH] fix: integration test video source detection for Chinese names --- internal/service/integration_test.go | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/internal/service/integration_test.go b/internal/service/integration_test.go index 19bb10b..5d4527b 100644 --- a/internal/service/integration_test.go +++ b/internal/service/integration_test.go @@ -223,21 +223,16 @@ func TestIntegration_WizardDeployRoundtrip(t *testing.T) { } page := string(body) - // Find a video source + // Find a video source name from table cell sourceName := "" for _, line := range strings.Split(page, "\n") { - for _, prefix := range []string{">cam", ">src_", ">gate_"} { - if idx := strings.Index(line, prefix); idx >= 0 { - rest := line[idx+1:] - if end := strings.Index(rest, "<"); end > 1 { - sourceName = rest[:end] - break - } + if idx := strings.Index(line, ">车间"); idx >= 0 { + rest := line[idx+1:] + if end := strings.Index(rest, "<"); end > 1 { + sourceName = rest[:end] + break } } - if sourceName != "" { - break - } } if sourceName == "" { t.Skip("no video source found")