From 4cc5808883cd52c8ea1b45c5157da0720c3f79ac Mon Sep 17 00:00:00 2001 From: Jake Daynes Date: Fri, 13 Mar 2026 02:32:27 -0700 Subject: [PATCH] fix: update nmap scan test to handle Secure flag --- internal/scan/nmap/scanner_test.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/internal/scan/nmap/scanner_test.go b/internal/scan/nmap/scanner_test.go index 94ad0bb..4ab4db8 100644 --- a/internal/scan/nmap/scanner_test.go +++ b/internal/scan/nmap/scanner_test.go @@ -54,6 +54,7 @@ func TestScanner_Scan(t *testing.T) { Addresses: []nmaplib.Address{{Addr: "192.0.2.10"}, {Addr: "192.0.2.11"}}, Ports: []nmaplib.Port{ openPort(8554, "rtsp-alt", "Model A"), + openPort(322, "rtsps", "Model C"), }, }, nmaplib.Host{ @@ -68,19 +69,34 @@ func TestScanner_Scan(t *testing.T) { Device: "Model A", Address: netip.MustParseAddr("192.0.2.10"), Port: 8554, + Secure: false, + }, + { + Device: "Model C", + Address: netip.MustParseAddr("192.0.2.10"), + Port: 322, + Secure: true, }, { Device: "Model A", Address: netip.MustParseAddr("192.0.2.11"), Port: 8554, + Secure: false, + }, + { + Device: "Model C", + Address: netip.MustParseAddr("192.0.2.11"), + Port: 322, + Secure: true, }, { Device: "Model B", Address: netip.MustParseAddr("198.51.100.9"), Port: 554, + Secure: false, }, }, - wantProgress: "Found 3 RTSP streams", + wantProgress: "Found 5 RTSP streams", }, { name: "returns error when scan fails",