MCPcopy Create free account
hub / github.com/SamNet-dev/snix / TestPatchRejectsConfigWithoutOutbounds

Function TestPatchRejectsConfigWithoutOutbounds

integrate/integrate_test.go:75–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestPatchRejectsConfigWithoutOutbounds(t *testing.T) {
76 dir := t.TempDir()
77 p := filepath.Join(dir, "config.json")
78 if err := os.WriteFile(p, []byte(`{"log":{}}`), 0o644); err != nil {
79 t.Fatal(err)
80 }
81 if err := jsonProxyPatcher(p)("x", 1); err == nil {
82 t.Fatal("expected error")
83 }
84}
85
86func TestSingBoxPatcher(t *testing.T) {
87 src := []byte(`{

Callers

nothing calls this directly

Calls 1

jsonProxyPatcherFunction · 0.85

Tested by

no test coverage detected