diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go index bed3e699ef0a..58ac7abb5e9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go +++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go @@ -567,7 +567,7 @@ func getIPTablesRestoreWaitFlag(exec utilexec.Interface) []string { return nil } - return []string{"--wait=2"} + return []string{WaitSecondsString} } // getIPTablesRestoreVersionString runs "iptables-restore --version" to get the version string diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_test.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_test.go index 0f2fbb9be3d2..e7a34d97fcde 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_test.go @@ -1051,7 +1051,7 @@ func TestRestoreAllWait(t *testing.T) { } commandSet := sets.NewString(fcmd.CombinedOutputLog[2]...) - if !commandSet.HasAll("iptables-restore", "--wait=2", "--counters", "--noflush") { + if !commandSet.HasAll("iptables-restore", WaitSecondsString, "--counters", "--noflush") { t.Errorf("wrong CombinedOutput() log, got %s", fcmd.CombinedOutputLog[2]) } @@ -1100,8 +1100,8 @@ func TestRestoreAllWaitOldIptablesRestore(t *testing.T) { if !commandSet.HasAll("iptables-restore", "--counters", "--noflush") { t.Errorf("wrong CombinedOutput() log, got %s", fcmd.CombinedOutputLog[2]) } - if commandSet.HasAny("--wait=2") { - t.Errorf("wrong CombinedOutput() log (unexpected --wait=2 option), got %s", fcmd.CombinedOutputLog[2]) + if commandSet.HasAny(WaitSecondsString) { + t.Errorf("wrong CombinedOutput() log (unexpected %s option), got %s", WaitSecondsString, fcmd.CombinedOutputLog[2]) } if fcmd.CombinedOutputCalls != 3 {