提交 e6eb9b6d 编写于 作者: D Dan Lorenc 提交者: dlorenc

Add a test for the new IP command.

上级 41cc0022
......@@ -20,7 +20,9 @@ package integration
import (
"flag"
"net"
"os"
"strings"
"testing"
"k8s.io/minikube/test/integration/util"
......@@ -37,6 +39,12 @@ func TestStartStop(t *testing.T) {
runner.RunCommand("start", true)
runner.CheckStatus("Running")
ip := runner.RunCommand("ip", true)
ip = strings.TrimRight(ip, "\n")
if net.ParseIP(ip) == nil {
t.Fatalf("IP command returned an invalid address: %s", ip)
}
runner.RunCommand("stop", true)
runner.CheckStatus("Stopped")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册