package api import "testing" func TestRoutingModeReflectsOnlyAuthorizedDefaultRoute(t *testing.T) { for _, tc := range []struct{ allowed, want string }{ {"10.88.0.0/24", "split"}, {"10.88.0.0/24, 0.0.0.0/0", "global_ipv4"}, {"0.0.0.0/00", "split"}, {"", "split"}, } { if got := routingModeForAllowedIPs(tc.allowed); got != tc.want { t.Errorf("%q: got %q, want %q", tc.allowed, got, tc.want) } } }