Change:
} } <del> // This test verifies that Proxy Server does not crash when CleanupAndExit is true. func TestProxyServerWithCleanupAndExit(t *testing.T) { options, err := NewOptions() if err != nil { t.Fatal(err) </del> <ins> // TestNewOptionsFailures tests failure modes for NewOptions() func TestNewOptionsFailures(t *testing.T) { // Create a fake scheme builder that generates an error errString := fmt.Sprintf("Simulated error") genError := func(scheme *k8sRuntime.Scheme) error { return errors.New(errString) </ins> } <ins> fakeSchemeBuilder := k8sRuntime.NewSchemeBuilder(genError) simulatedErrorTest := func(target string) { var addToScheme *func(s *k8sRuntime.Scheme) error if target == "componentconfig" { addToScheme = &componentconfig.AddToScheme } else { addToScheme = &v1alpha1.AddToScheme } restoreValue := *addToScheme restore := func() { *addToScheme = restoreValue } defer restore() *addToScheme = fakeSchemeBuilder.AddToScheme _, err := NewOptions() assert.Error(t, err, fmt.Sprintf("Simulated error in component %s", target)) } // Simulate errors in calls to AddToScheme() faultTargets := []string{"componentconfig", "v1alpha1"} for _, target := range faultTargets { simulatedErrorTest(target) } } </ins> <del> options.config = &componentconfig.KubeProxyConfiguration{ BindAddress: "0.0.0.0", </del> <ins> // This test verifies that NewProxyServer does not crash when CleanupAndExit is true. func TestProxyServerWithCleanupAndExit(t *testing.T) { // Each bind address below is a separate test case bindAddresses := []string{ "0.0.0.0", "2001:db8::1", </ins> } <del> options.CleanupAndExit = true </del> <ins> for _, addr := range bindAddresses { options, err := NewOptions() if err != nil { t.Fatalf("Unexpected error with address %s: %v", addr, err) } options.config = &componentconfig.KubeProxyConfiguration{ BindAddress: addr, } options.CleanupAndExit = true proxyserver, err := NewProxyServer(options.config, options.CleanupAndExit, options.scheme, options.master) </ins> <del> proxyserver, err := NewProxyServer(options.config, options.CleanupAndExit, options.scheme, options.master) </del> <ins> assert.Nil(t, err, "unexpected error in NewProxyServer, addr: %s", addr) assert.NotNil(t, proxyserver, "nil proxy server obj, addr: %s", addr) assert.NotNil(t, proxyserver.IptInterface, "nil iptables intf, addr: %s", addr) </ins> <del> assert.Nil(t, err) assert.NotNil(t, proxyserver) assert.NotNil(t, proxyserver.IptInterface) </del> <ins> // Clean up config for next test case configz.Delete("componentconfig") } </ins> } func TestGetConntrackMax(t *testing.T) {

Discussion:
Is this a request for help? No. What keywords did you search in Kubernetes issues before filing this one? is:issue is:open ipv6 Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST Kubernetes version (use ): N/A, these are unit test changes in latest master Environment: Cloud provider or hardware configuration: Kubernetes container dev env on Ubuntu 16.04.1 OS (e.g. from /etc/os-release): Ubuntu 16.04.1 Kernel (e.g. ): 4.4.0-78-generic -Ubuntu x8664 GNU/Linux Install tools: Others: What happened: Upon inspection, no IPv6 test cases found in kubernetes/cmd/kube- What you expected to happen: Expect to see some IPv6 test cases exercised for kube-proxy server code (kubernetes/cmd/kube-). Also need some code coverage for negative conditions in How to reproduce it (as minimally and precisely as possible): Run unit tests in kubernetes/cmd/kube- Anything else we need to know:
There are no sig labels on this issue. Please by:<br(1) mentioning a sig: <br(2) specifying the label manually: <br<brNote: method (1) will trigger a notification to the team. You can find the team list and label list
/sig networking
/area ipv6
/sig network