Remove tests that called exit code
parent
1052ff77bd
commit
793739d46a
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue