improve iptables-restore implementation #27559

- improve restoreInternal implementation in iptables
- add SetStdin and SetStdout functions to Cmd interface
- modify kubelet/prober and some tests in order to work with Cmd interface
This commit is contained in:
Jing Liu
2016-06-16 12:19:34 -07:00
parent afedd3d34d
commit ef66f1ead8
5 changed files with 42 additions and 24 deletions

View File

@@ -18,6 +18,7 @@ package exec
import (
"fmt"
"io"
"testing"
"k8s.io/kubernetes/pkg/probe"
@@ -39,6 +40,10 @@ func (f *FakeCmd) Output() ([]byte, error) {
func (f *FakeCmd) SetDir(dir string) {}
func (f *FakeCmd) SetStdin(in io.Reader) {}
func (f *FakeCmd) SetStdout(out io.Writer) {}
type fakeExitError struct {
exited bool
statusCode int