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

Function TestManagerInitializeNilClient

backend/wireguard/manager_test.go:291–303  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

289}
290
291func TestManagerInitializeNilClient(t *testing.T) {
292 manager := &Manager{
293 iFaceName: "wg-test",
294 }
295
296 err := manager.InitializeWithPeers(wgtypes.Key{}, 51820, []string{"10.0.0.1/24"}, nil)
297 if err == nil {
298 t.Fatal("expected initialize error, got nil")
299 }
300 if !strings.Contains(err.Error(), "wgctrl client is not initialized") {
301 t.Fatalf("unexpected initialize error: %v", err)
302 }
303}
304
305func TestManagerGetDeviceNilClient(t *testing.T) {
306 manager := &Manager{

Callers

nothing calls this directly

Calls 2

InitializeWithPeersMethod · 0.95
ErrorMethod · 0.80

Tested by

no test coverage detected