Files
x_gift_bot/internal/proxy/pool_test.go
T
mizorewww 7493a72941 feat: add order recovery and per-order payment proxy pools
Add customer code lookup, single-order and batch recovery, and verified replacement checkout links with preserved payment evidence.

Add payment pause controls, persisted per-order outbound selection, proxy diagnostics, admin status, documentation, tests, and rebuilt frontend assets.
2026-10-03 21:59:14 +08:00

22 lines
819 B
Go

package proxy
import "testing"
func TestOutboundPoolOnlyAcceptsIndependentArray(t *testing.T) {
for _, raw := range []string{
`{"outbounds":[]}`, `null`, `[null]`, `[{}]`,
`[{"type":"selector","tag":"a","server":"example.invalid","server_port":443}]`,
`[{"type":"http","tag":"a","server":"example.invalid","server_port":443,"detour":"other"}]`,
`[{"type":"http","tag":"a","server":"example.invalid","server_port":443},{"type":"http","tag":"a","server":"other.invalid","server_port":443}]`,
} {
if _, err := ParseOutboundPool([]byte(raw)); err == nil {
t.Fatalf("accepted invalid shape: %s", raw)
}
}
for _, raw := range []string{`[]`, `[{"type":"http","tag":"a","server":"example.invalid","server_port":443}]`} {
if _, err := ParseOutboundPool([]byte(raw)); err != nil {
t.Fatal(err)
}
}
}