05ae530442
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers. Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent. Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
37 lines
1.3 KiB
Go
37 lines
1.3 KiB
Go
package client
|
|
|
|
import "testing"
|
|
|
|
func TestTransportTargetRewritesOnlyExactSource(t *testing.T) {
|
|
t.Setenv("PIPELINES_TRANSPORT_SOURCE", "ws://127.0.0.1:8081/connect")
|
|
t.Setenv("PIPELINES_TRANSPORT_TARGET", "ws://127.0.0.1:8080/connect")
|
|
if got := transportTarget("ws://127.0.0.1:8081/connect"); got != "ws://127.0.0.1:8080/connect" {
|
|
t.Fatalf("exact source not rewritten: %s", got)
|
|
}
|
|
for _, other := range []string{
|
|
"ws://127.0.0.1:8082/connect",
|
|
"ws://example.com:8081/connect",
|
|
"ws://127.0.0.1:8081/other",
|
|
} {
|
|
if got := transportTarget(other); got != other {
|
|
t.Fatalf("non-source %s rewritten to %s", other, got)
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestTransportTargetIgnoresMissingOrInvalidAliases(t *testing.T) {
|
|
requested := "ws://127.0.0.1:8081/connect"
|
|
for _, tc := range []struct{ source, target string }{
|
|
{"", "ws://127.0.0.1:8080/connect"},
|
|
{"ws://127.0.0.1:8081/connect", ""},
|
|
{"http://127.0.0.1:8081/connect", "ws://127.0.0.1:8080/connect"},
|
|
{"ws://127.0.0.1:8081/connect", "ws://127.0.0.1:8081/connect"},
|
|
} {
|
|
t.Setenv("PIPELINES_TRANSPORT_SOURCE", tc.source)
|
|
t.Setenv("PIPELINES_TRANSPORT_TARGET", tc.target)
|
|
if got := transportTarget(requested); got != requested {
|
|
t.Fatalf("aliases %q -> %q rewrote %s to %s", tc.source, tc.target, requested, got)
|
|
}
|
|
}
|
|
}
|