提交 92763ca4 编写于 作者: T Thomas Stromberg

Remove deprecated error message check. Never check text on error messages :(

上级 f2d6f455
......@@ -18,7 +18,6 @@ package cluster
import (
"os"
"strings"
"testing"
"github.com/docker/machine/libmachine/drivers"
......@@ -256,29 +255,6 @@ func TestDeleteHostErrorDeletingFiles(t *testing.T) {
}
}
func TestDeleteHostMultipleErrors(t *testing.T) {
api := tests.NewMockAPI()
api.RemoveError = true
h, _ := createHost(api, defaultMachineConfig)
d := &tests.MockDriver{RemoveError: true}
h.Driver = d
err := DeleteHost(api)
if err == nil {
t.Fatal("Expected error deleting host, didn't get one.")
}
expectedErrors := []string{"error removing " + config.GetMachineName(), "error deleting machine"}
for _, expectedError := range expectedErrors {
if !strings.Contains(err.Error(), expectedError) {
t.Fatalf("Error %v expected to contain: %s.", err, expectedError)
}
}
}
func TestGetHostStatus(t *testing.T) {
api := tests.NewMockAPI()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册