worker: fix integration test
the integration test was still using the previous way of configuring the
set of nameservers that was based on the CNINetworkConfig, but, we
switched to using functional options, which should've been updated here
as well.
@@ -355,10 +355,11 @@ func (s *IntegrationSuite) TestCustomDNS() {
namespace := "test-custom-dns"
requestTimeout := 3 * time.Second
- cniNetworkConfig := backend.GetDefaultCNINetworkConfig()
- cniNetworkConfig.NameServers = []string{"1.1.1.1", "1.2.3.4"}
- networkConfigOpt := backend.WithCNINetworkConfig(cniNetworkConfig)
- network, err := backend.NewCNINetwork(networkConfigOpt)
+ network, err := backend.NewCNINetwork(
+ backend.WithNameServers([]string{
+ "1.1.1.1", "1.2.3.4",
+ }),
+ )
s.NoError(err)
networkOpt := backend.WithNetwork(network)
@@ -413,7 +414,6 @@ func (s *IntegrationSuite) TestCustomDNS() {
s.Equal(expectedDNSServer, buf.String())
}
-
// TestUngracefulStop aims at validating that we're giving the process enough
// opportunity to finish, but that at the same time, we don't wait forever.
//
