Skip to content

Commit 81c89fc

Browse files
committed
test dns in nwCfg propagates to all endpoint infos
1 parent a01bfd0 commit 81c89fc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cni/network/network_linux_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ func TestPluginLinuxAdd(t *testing.T) {
235235
MultiTenancy: false,
236236
EnableExactMatchForPodName: true,
237237
// test auto finding master interface
238+
DNS: types.DNS{
239+
Nameservers: []string{
240+
"ns1", "ns2",
241+
},
242+
Domain: "myDomain",
243+
},
238244
}
239245
macAddress := "60:45:bd76:f6:44"
240246
parsedMACAddress, _ := net.ParseMAC(macAddress)
@@ -405,6 +411,12 @@ func TestPluginLinuxAdd(t *testing.T) {
405411
NetNsPath: "bc526fae-4ba0-4e80-bc90-ad721e5850bf",
406412
NetNs: "bc526fae-4ba0-4e80-bc90-ad721e5850bf",
407413
HostSubnetPrefix: "10.224.0.0/16",
414+
EndpointDNS: network.DNSInfo{
415+
Servers: []string{
416+
"ns1", "ns2",
417+
},
418+
Suffix: "myDomain",
419+
},
408420
Options: map[string]interface{}{
409421
"testflag": "copy",
410422
},
@@ -456,6 +468,12 @@ func TestPluginLinuxAdd(t *testing.T) {
456468
NetNsPath: "bc526fae-4ba0-4e80-bc90-ad721e5850bf",
457469
NetNs: "bc526fae-4ba0-4e80-bc90-ad721e5850bf",
458470
HostSubnetPrefix: "<nil>",
471+
EndpointDNS: network.DNSInfo{
472+
Servers: []string{
473+
"ns1", "ns2",
474+
},
475+
Suffix: "myDomain",
476+
},
459477
Options: map[string]interface{}{
460478
"testflag": "copy",
461479
},

0 commit comments

Comments
 (0)