2021-02-15 05:09:18 +00:00
|
|
|
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2021-06-03 15:18:59 +00:00
|
|
|
// +build linux darwin,!ts_macext
|
2021-02-15 05:09:18 +00:00
|
|
|
|
|
|
|
package interfaces
|
|
|
|
|
2021-03-25 19:24:01 +00:00
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
2021-02-15 05:09:18 +00:00
|
|
|
|
|
|
|
func TestDefaultRouteInterface(t *testing.T) {
|
2021-03-25 19:24:01 +00:00
|
|
|
// tests /proc/net/route on the local system, cannot make an assertion about
|
|
|
|
// the correct interface name, but good as a sanity check.
|
2021-02-15 05:09:18 +00:00
|
|
|
v, err := DefaultRouteInterface()
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
t.Logf("got %q", v)
|
|
|
|
}
|