mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-07 06:29:06 +01:00
[client] Remove test scenario (#2447)
Fix the flickering test. Because we eliminated the direct property, can flicker a test because any output could be valid. Remove unnecessary test cases.
This commit is contained in:
parent
4d162f1750
commit
3bd820f2e4
@ -144,33 +144,6 @@ func TestGetBestrouteFromStatuses(t *testing.T) {
|
|||||||
currentRoute: "",
|
currentRoute: "",
|
||||||
expectedRouteID: "route1",
|
expectedRouteID: "route1",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "multiple connected peers with one direct",
|
|
||||||
statuses: map[route.ID]routerPeerStatus{
|
|
||||||
"route1": {
|
|
||||||
connected: true,
|
|
||||||
relayed: false,
|
|
||||||
},
|
|
||||||
"route2": {
|
|
||||||
connected: true,
|
|
||||||
relayed: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
existingRoutes: map[route.ID]*route.Route{
|
|
||||||
"route1": {
|
|
||||||
ID: "route1",
|
|
||||||
Metric: route.MaxMetric,
|
|
||||||
Peer: "peer1",
|
|
||||||
},
|
|
||||||
"route2": {
|
|
||||||
ID: "route2",
|
|
||||||
Metric: route.MaxMetric,
|
|
||||||
Peer: "peer2",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
currentRoute: "",
|
|
||||||
expectedRouteID: "route1",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "multiple connected peers with different latencies",
|
name: "multiple connected peers with different latencies",
|
||||||
statuses: map[route.ID]routerPeerStatus{
|
statuses: map[route.ID]routerPeerStatus{
|
||||||
|
@ -2,6 +2,7 @@ package healthcheck
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -10,7 +11,8 @@ func TestMain(m *testing.M) {
|
|||||||
// override the health check interval to speed up the test
|
// override the health check interval to speed up the test
|
||||||
healthCheckInterval = 1 * time.Second
|
healthCheckInterval = 1 * time.Second
|
||||||
healthCheckTimeout = 100 * time.Millisecond
|
healthCheckTimeout = 100 * time.Millisecond
|
||||||
m.Run()
|
code := m.Run()
|
||||||
|
os.Exit(code)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNewHealthPeriod(t *testing.T) {
|
func TestNewHealthPeriod(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user