Skip to content

Commit 955b7a5

Browse files
committed
Extend updateSubnetDNSNameservers unit-tests
1 parent 7b5086d commit 955b7a5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/cloud/services/networking/network_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ func Test_updateSubnetDNSNameservers(t *testing.T) {
8383
}, nil)
8484
},
8585
},
86+
{
87+
name: "same nameservers but different order",
88+
currentNameservers: []string{"8.8.8.8", "8.8.4.4"},
89+
desiredNameservers: []string{"8.8.4.4", "8.8.8.8"},
90+
expect: func(m *mock.MockNetworkClientMockRecorder) {
91+
m.UpdateSubnet(subnetID, subnets.UpdateOpts{
92+
DNSNameservers: &[]string{"8.8.4.4", "8.8.8.8"},
93+
}).Return(&subnets.Subnet{
94+
ID: subnetID,
95+
DNSNameservers: []string{"8.8.4.4", "8.8.8.8"},
96+
}, nil)
97+
},
98+
},
8699
}
87100

88101
for _, tt := range tests {

0 commit comments

Comments
 (0)