Commit ff222d5e authored by Lubomir I. Ivanov's avatar Lubomir I. Ivanov

kubeadm: remove unit test TestNewCmdReset

Remove the test called TestNewCmdReset in cmd/reset_test.go, since it can prompt for root password and it then calls an actual reset and shuts down the kubelet.
parent 5966ed77
......@@ -68,22 +68,6 @@ func TestNewReset(t *testing.T) {
NewReset(in, ignorePreflightErrorsSet, forceReset, certsDir, criSocketPath)
}
func TestNewCmdReset(t *testing.T) {
var out io.Writer
var in io.Reader
cmd := NewCmdReset(in, out)
tmpDir, err := ioutil.TempDir("", "kubeadm-reset-test")
if err != nil {
t.Errorf("Unable to create temporary directory: %v", err)
}
args := []string{"--ignore-preflight-errors=all", "--cert-dir=" + tmpDir, "--force"}
cmd.SetArgs(args)
if err := cmd.Execute(); err != nil {
t.Errorf("Cannot execute reset command: %v", err)
}
}
func TestConfigDirCleaner(t *testing.T) {
tests := map[string]struct {
resetDir string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment