From 38f4e68f37a30557ee2f1c2b395d361b949a636f Mon Sep 17 00:00:00 2001 From: Andrew Li <65982444+drewhli@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:36:18 -0700 Subject: [PATCH] Check for gve in gvnic tests as well (#840) * Check for gve in gvnic tests as well * Change && to || * Revert || back to && --- imagetest/test_suites/network/gvnic_test.go | 4 ++-- imagetest/test_suites/networkperf/gvnic_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/imagetest/test_suites/network/gvnic_test.go b/imagetest/test_suites/network/gvnic_test.go index 1453c4e58..2896c261c 100644 --- a/imagetest/test_suites/network/gvnic_test.go +++ b/imagetest/test_suites/network/gvnic_test.go @@ -26,8 +26,8 @@ func CheckGVNICPresent(interfaceName string) error { } s := strings.Split(data, "/") driver := s[len(s)-1] - if driver != "gvnic" { - errMsg := fmt.Sprintf("Driver set as %v want gvnic", driver) + if driver != "gvnic" && driver != "gve" { + errMsg := fmt.Sprintf("Driver set as %v want gvnic or gve", driver) return errors.New(errMsg) } return nil diff --git a/imagetest/test_suites/networkperf/gvnic_test.go b/imagetest/test_suites/networkperf/gvnic_test.go index 17ba06c0d..141f947c7 100644 --- a/imagetest/test_suites/networkperf/gvnic_test.go +++ b/imagetest/test_suites/networkperf/gvnic_test.go @@ -26,8 +26,8 @@ func CheckGVNICPresent(interfaceName string) error { } s := strings.Split(data, "/") driver := s[len(s)-1] - if driver != "gvnic" { - errMsg := fmt.Sprintf("Driver set as %v want gvnic", driver) + if driver != "gvnic" && driver != "gve" { + errMsg := fmt.Sprintf("Driver set as %v want gvnic or gve", driver) return errors.New(errMsg) } return nil