fix(dev): address CLI review feedback

This commit is contained in:
Thomas Camlong committed 2026-07-31 14:53:43 +02:00
1 parent e97eb7fc58
commit c8485ed7fc
18 files changed
+307 -160

No files matched your search

@@ -25,3 +25,18 @@ func TestIsPortConflict(t *testing.T) {
t.Fatal("manifest error classified as port conflict")
}
}
func TestParseUsedDockerPortsPreservesLineBoundaries(t *testing.T) {
ports := parseUsedDockerPorts([]byte("6379/tcp\n0.0.0.0:7575->7575/tcp, [::]:7575->7575/tcp\n0.0.0.0:8000-8002->8000-8002/tcp\n"))
for _, port := range []int{7575, 8000, 8001, 8002} {
if !ports[port] {
t.Fatalf("port %d was not detected", port)
}
}
}
func TestFindFreePortRejectsOutOfRangeStart(t *testing.T) {
if port := FindFreePort(65536); port != 0 {
t.Fatalf("port = %d, want 0", port)
}
}