Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Add unit test on TestAcceleratedNetworkingSupported
Browse files Browse the repository at this point in the history
  • Loading branch information
julienstroheker committed Jul 16, 2018
1 parent 39ee789 commit 32f2213
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkg/helpers/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,58 @@ EPDesL0rH+3s1CKpgkhYdbJ675GFoGoq+X21QaqsdvoXmmuJF9qq9Tq+JaWloUNq
t.Fatalf("Public Key did not match expected format/value")
}
}

func TestAcceleratedNetworkingSupported(t *testing.T) {
cases := []struct {
input string
expectedResult bool
}{
{
input: "Standard_A1",
expectedResult: false,
},
{
input: "Standard_G4",
expectedResult: false,
},
{
input: "Standard_B3",
expectedResult: false,
},
{
input: "Standard_D1_v2",
expectedResult: false,
},
{
input: "Standard_L3",
expectedResult: false,
},
{
input: "Standard_NC6",
expectedResult: false,
},
{
input: "Standard_G4",
expectedResult: false,
},
{
input: "Standard_D2_v2",
expectedResult: true,
},
{
input: "Standard_DS2_v2",
expectedResult: true,
},
{
input: "",
expectedResult: true,
},
}

for _, c := range cases {
result := AcceleratedNetworkingSupported(c.input)
if c.expectedResult != result {
t.Fatalf("AcceleratedNetworkingSupported returned unexpected result: expected %t but got %t", c.expectedResult, result)
}
}
}

0 comments on commit 32f2213

Please sign in to comment.