(t *testing.T)
| 289 | } |
| 290 | |
| 291 | func 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 | |
| 305 | func TestManagerGetDeviceNilClient(t *testing.T) { |
| 306 | manager := &Manager{ |
nothing calls this directly
no test coverage detected