summaryrefslogtreecommitdiffhomepage
path: root/wgengine/userspace_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'wgengine/userspace_test.go')
-rw-r--r--wgengine/userspace_test.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/wgengine/userspace_test.go b/wgengine/userspace_test.go
index 0a1d2924d..abcf2f64f 100644
--- a/wgengine/userspace_test.go
+++ b/wgengine/userspace_test.go
@@ -325,7 +325,7 @@ func TestUserspaceEnginePeerMTUReconfig(t *testing.T) {
}
}
-func TestTSMPKeyAdvertisement(t *testing.T) {
+func TestTSMPDiscoKeyRequest(t *testing.T) {
var knobs controlknobs.Knobs
bus := eventbustest.NewBus(t)
@@ -369,13 +369,12 @@ func TestTSMPKeyAdvertisement(t *testing.T) {
t.Fatal(err)
}
- addr := netip.MustParseAddr("100.100.99.1")
- previousValue := metricTSMPDiscoKeyAdvertisementSent.Value()
- ue.sendTSMPDiscoAdvertisement(addr)
- if val := metricTSMPDiscoKeyAdvertisementSent.Value(); val <= previousValue {
- errs := metricTSMPDiscoKeyAdvertisementError.Value()
- t.Errorf("Expected 1 disco key advert, got %d, errors %d", val, errs)
+ peerAddr := netip.MustParseAddr("100.100.99.1")
+ err = ue.sendTSMPDiscoKeyRequest(peerAddr)
+ if err != nil {
+ t.Fatalf("sendTSMPDiscoKeyRequest failed: %v", err)
}
+
// Remove config to have the engine shut down more consistently
err = ue.Reconfig(&wgcfg.Config{}, &router.Config{}, &dns.Config{})
if err != nil {