Commit cc2ab84

Karn Wong <karn@karnwong.me>
2024-07-26 07:20:46
test: remove iface test due to unpredictable network interfaces naming
1 parent c4ad5a9
Changed files (1)
cmd/get/get_iface_test.go
@@ -1,20 +0,0 @@
-package get
-
-import (
-	"strings"
-	"testing"
-)
-
-func TestGetIface(t *testing.T) {
-	iface, err := getIface()
-	if err != nil {
-		t.Errorf("getIface() error = %v", err)
-	} else {
-		isEn := strings.HasPrefix(iface, "en")
-		isUtun := strings.HasPrefix(iface, "utun")
-		isWlp := strings.HasPrefix(iface, "wlp")
-		if !(isEn || isUtun || isWlp) {
-			t.Errorf("getIface() does not return expected interface: %s", iface)
-		}
-	}
-}