(t *testing.T)
| 16 | ) |
| 17 | |
| 18 | func TestIsNetstack(t *testing.T) { |
| 19 | sys := tsd.NewSystem() |
| 20 | e, err := wgengine.NewUserspaceEngine( |
| 21 | tstest.WhileTestRunningLogger(t), |
| 22 | wgengine.Config{ |
| 23 | SetSubsystem: sys.Set, |
| 24 | HealthTracker: sys.HealthTracker.Get(), |
| 25 | Metrics: sys.UserMetricsRegistry(), |
| 26 | EventBus: sys.Bus.Get(), |
| 27 | }, |
| 28 | ) |
| 29 | if err != nil { |
| 30 | t.Fatal(err) |
| 31 | } |
| 32 | defer e.Close() |
| 33 | if !sys.IsNetstack() { |
| 34 | t.Errorf("IsNetstack = false; want true") |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func TestIsNetstackRouter(t *testing.T) { |
| 39 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…