Skip to content

Commit

Permalink
Add the IDPF NIC name test to C3-Metal.
Browse files Browse the repository at this point in the history
Tests that GoogleCloudPlatform/guest-configs#95 doesn't cause NIC name regressions on C3 Metal.

PiperOrigin-RevId: 705992843
  • Loading branch information
a-crate authored and copybara-github committed Dec 13, 2024
1 parent 4d24b05 commit 918ecbf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ var (
predictableNICNameRegex = regexp.MustCompile("^en.*")
)

func TestIDPFNICNamingScheme(t *testing.T) {
// Test that the IDPF PF NIC on C3Metal still matches the rest of the NIC
// naming scheme.
TestNICNamingScheme(t)
}

func TestNICNamingScheme(t *testing.T) {
if utils.IsWindows() {
nics, err := net.Interfaces()
Expand Down
12 changes: 12 additions & 0 deletions test_suites/networkinterfacenaming/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,17 @@ func TestSetup(t *imagetest.TestWorkflow) error {
}
nicnameVM.RunTests("TestNICNamingScheme")

if t.Image.Architecture == "X86_64" && utils.HasFeature(t.Image, "IDPF") {
c3metal := &daisy.Instance{}
c3metal.MachineType = "c3-standard-192-metal"
c3metal.Zone = "us-central1-a"
c3metal.Scheduling = &compute.Scheduling{OnHostMaintenance: "TERMINATE"}
c3metalVM, err := t.CreateTestVMMultipleDisks([]*compute.Disk{{Name: "c3metal"}}, c3metal)
if err != nil {
return err
}
c3metalVM.RunTests("TestIDPFNICNamingScheme")
}

return nil
}

0 comments on commit 918ecbf

Please sign in to comment.