提交 af97e0b2 编写于 作者: M Matt Rickard 提交者: GitHub

Merge pull request #1868 from r2d4/remove-tests

Remove tests that called exit code
......@@ -18,9 +18,6 @@ package config
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"github.com/docker/machine/libmachine/drivers"
......@@ -36,30 +33,6 @@ func TestDisableUnknownAddon(t *testing.T) {
}
}
func TestDisableValidAddonLocal(t *testing.T) {
tempDir := tests.MakeTempDir()
defer os.RemoveAll(tempDir)
addonName := "dashboard"
expected := "false"
if err := Set(addonName, expected); err != nil {
//check that setting was changed in temp dir
conf, _ := ioutil.ReadFile(filepath.Join(tempDir, "config", "config.json"))
strConf := string(conf)
if !strings.Contains(strConf, addonName) {
t.Fatalf("Expected %s, in %s after running disable", addonName, strConf)
}
if !strings.Contains(strConf, expected) {
t.Fatalf("Expected %s, in %s after running disable", expected, strConf)
}
//check that nothing was transferred?
} else {
if err != nil {
t.Fatalf("Disable returned error for known addon")
}
}
}
func TestDeleteAddonSSH(t *testing.T) {
s, _ := tests.NewSSHServer()
port, err := s.Start()
......
......@@ -19,9 +19,6 @@ package config
import (
"bytes"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"github.com/docker/machine/libmachine/drivers"
......@@ -36,29 +33,6 @@ func TestEnableUnknownAddon(t *testing.T) {
}
}
func TestEnableValidAddonLocal(t *testing.T) {
tempDir := tests.MakeTempDir()
defer os.RemoveAll(tempDir)
addonName := "dashboard"
expected := "true"
if err := Set(addonName, expected); err != nil {
//check that setting was changed in temp dir
conf, _ := ioutil.ReadFile(filepath.Join(tempDir, "config", "config.json"))
strConf := string(conf)
if !strings.Contains(strConf, addonName) {
t.Fatalf("Expected %s, in %s after running enable", addonName, strConf)
}
if !strings.Contains(strConf, expected) {
t.Fatalf("Expected %s, in %s after running enable", expected, strConf)
}
} else {
if err != nil {
t.Fatalf("Enable returned error for known addon")
}
}
}
func TestTransferAddonSSH(t *testing.T) {
s, _ := tests.NewSSHServer()
port, err := s.Start()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册