MCPcopy Create free account
hub / github.com/PasarGuard/node / TestNewWireGuardConfigInvalidJSON

Function TestNewWireGuardConfigInvalidJSON

backend/wireguard/config_test.go:103–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestNewWireGuardConfigInvalidJSON(t *testing.T) {
104 configJSON := `{invalid json}`
105
106 _, err := NewConfig(configJSON)
107 if err == nil {
108 t.Fatal("Expected error for invalid JSON")
109 }
110}
111
112func TestGenerateKeyPair(t *testing.T) {
113 privKey, pubKey, err := GenerateKeyPair()

Callers

nothing calls this directly

Calls 1

NewConfigFunction · 0.70

Tested by

no test coverage detected