(t *testing.T, configJSON string, users []*common.User)
| 51 | } |
| 52 | |
| 53 | func createTestWireGuardWithUsers(t *testing.T, configJSON string, users []*common.User) *WireGuard { |
| 54 | t.Helper() |
| 55 | |
| 56 | wgConfig, err := NewConfig(configJSON) |
| 57 | if err != nil { |
| 58 | t.Fatalf("Failed to create WireGuard config: %v", err) |
| 59 | } |
| 60 | |
| 61 | cfg := &config.Config{ |
| 62 | LogBufferSize: 100, |
| 63 | StatsUpdateIntervalSeconds: 10, |
| 64 | StatsCleanupIntervalSeconds: 300, |
| 65 | } |
| 66 | |
| 67 | wg, err := New(cfg, wgConfig, users) |
| 68 | if err != nil { |
| 69 | t.Fatalf("Failed to create WireGuard instance: %v", err) |
| 70 | } |
| 71 | |
| 72 | return wg |
| 73 | } |
| 74 | |
| 75 | func createTestWireGuard(t *testing.T, configJSON string) *WireGuard { |
| 76 | t.Helper() |
no test coverage detected