Skip to content

Commit 2d18485

Browse files
bpradiptclaude
andcommitted
Add comprehensive tests for remote manifest support
Adds cmd/common_test.go with 51 test cases covering: - isRemoteFile() URL detection (16 test cases) - HTTP/HTTPS URLs with ports, query params, fragments - File paths (absolute, relative, parent directories) - Invalid URLs and edge cases - isPrivateIP() SSRF protection (21 test cases) - IPv4/IPv6 loopback and link-local addresses - Private IP ranges (10.x, 172.16-31.x, 192.168.x, fc00::, fd00::) - Public IPs and edge cases - downloadRemoteFile() with mock HTTP servers (14 test cases) - Success/error scenarios (404, 500) - Size limit enforcement (Content-Length and actual size) - YAML validation and document limits - Redirect handling with SSRF protection - Timeout handling (30s) - Various Content-Type headers Co-Authored-By: Claude <[email protected]> Signed-off-by: Pradipta Banerjee <[email protected]>
1 parent 45bd6d9 commit 2d18485

File tree

1 file changed

+563
-0
lines changed

1 file changed

+563
-0
lines changed

0 commit comments

Comments
 (0)