Skip to content

Commit b3d79c8

Browse files
committed
add nma client test
1 parent ae21576 commit b3d79c8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

nmagent/client_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,14 +751,25 @@ func TestGetHomeAz(t *testing.T) {
751751
}{
752752
{
753753
"happy path",
754-
nmagent.AzResponse{HomeAz: uint(1)},
754+
nmagent.AzResponse{HomeAz: uint(1), AppliedFixes: nil},
755755
"/machine/plugins?comp=nmagent&type=GetHomeAz%2Fapi-version%2F1",
756756
map[string]interface{}{
757757
"httpStatusCode": "200",
758758
"HomeAz": 1,
759759
},
760760
false,
761761
},
762+
{
763+
"happy path with new version",
764+
nmagent.AzResponse{HomeAz: uint(1), AppliedFixes: []nmagent.HomeAZFix{nmagent.HomeAZFixIPv6}},
765+
"/machine/plugins?comp=nmagent&type=GetHomeAz%2Fapi-version%2F1",
766+
map[string]interface{}{
767+
"httpStatusCode": "200",
768+
"HomeAz": 1,
769+
"APIVersion": 2,
770+
},
771+
false,
772+
},
762773
{
763774
"empty response",
764775
nmagent.AzResponse{},

0 commit comments

Comments
 (0)