mirror of https://github.com/docker/docs.git
fixes from @nathanleclaire
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
b59d41b36b
commit
d52399a22d
|
@ -8,11 +8,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MACHINE_NAME = "machine-integration-test-%s"
|
machineName = "machine-integration-test-%s"
|
||||||
)
|
)
|
||||||
|
|
||||||
func machineCreate(name string, t *testing.T, wg *sync.WaitGroup) {
|
func machineCreate(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
mName := fmt.Sprintf(MACHINE_NAME, name)
|
mName := fmt.Sprintf(machineName, name)
|
||||||
fmt.Printf(" - testing create for %s (%s)\n", name, mName)
|
fmt.Printf(" - testing create for %s (%s)\n", name, mName)
|
||||||
runCmd := exec.Command(machineBinary, "create", "-d", name, mName)
|
runCmd := exec.Command(machineBinary, "create", "-d", name, mName)
|
||||||
out, exitCode, err := runCommandWithOutput(runCmd)
|
out, exitCode, err := runCommandWithOutput(runCmd)
|
||||||
|
@ -26,7 +26,7 @@ func machineCreate(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func machineStop(name string, t *testing.T, wg *sync.WaitGroup) {
|
func machineStop(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
mName := fmt.Sprintf(MACHINE_NAME, name)
|
mName := fmt.Sprintf(machineName, name)
|
||||||
fmt.Printf(" - testing stop for %s (%s)\n", name, mName)
|
fmt.Printf(" - testing stop for %s (%s)\n", name, mName)
|
||||||
runCmd := exec.Command(machineBinary, "stop", mName)
|
runCmd := exec.Command(machineBinary, "stop", mName)
|
||||||
out, exitCode, err := runCommandWithOutput(runCmd)
|
out, exitCode, err := runCommandWithOutput(runCmd)
|
||||||
|
@ -40,7 +40,7 @@ func machineStop(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func machineStart(name string, t *testing.T, wg *sync.WaitGroup) {
|
func machineStart(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
mName := fmt.Sprintf(MACHINE_NAME, name)
|
mName := fmt.Sprintf(machineName, name)
|
||||||
fmt.Printf(" - testing start for %s (%s)\n", name, mName)
|
fmt.Printf(" - testing start for %s (%s)\n", name, mName)
|
||||||
runCmd := exec.Command(machineBinary, "start", mName)
|
runCmd := exec.Command(machineBinary, "start", mName)
|
||||||
out, exitCode, err := runCommandWithOutput(runCmd)
|
out, exitCode, err := runCommandWithOutput(runCmd)
|
||||||
|
@ -54,7 +54,7 @@ func machineStart(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func machineKill(name string, t *testing.T, wg *sync.WaitGroup) {
|
func machineKill(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
mName := fmt.Sprintf(MACHINE_NAME, name)
|
mName := fmt.Sprintf(machineName, name)
|
||||||
fmt.Printf(" - testing kill for %s (%s)\n", name, mName)
|
fmt.Printf(" - testing kill for %s (%s)\n", name, mName)
|
||||||
runCmd := exec.Command(machineBinary, "kill", mName)
|
runCmd := exec.Command(machineBinary, "kill", mName)
|
||||||
out, exitCode, err := runCommandWithOutput(runCmd)
|
out, exitCode, err := runCommandWithOutput(runCmd)
|
||||||
|
@ -68,7 +68,7 @@ func machineKill(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func machineRm(name string, t *testing.T, wg *sync.WaitGroup) {
|
func machineRm(name string, t *testing.T, wg *sync.WaitGroup) {
|
||||||
mName := fmt.Sprintf(MACHINE_NAME, name)
|
mName := fmt.Sprintf(machineName, name)
|
||||||
fmt.Printf(" - testing rm for %s (%s)\n", name, mName)
|
fmt.Printf(" - testing rm for %s (%s)\n", name, mName)
|
||||||
runCmd := exec.Command(machineBinary, "rm", "-f", mName)
|
runCmd := exec.Command(machineBinary, "rm", "-f", mName)
|
||||||
out, exitCode, err := runCommandWithOutput(runCmd)
|
out, exitCode, err := runCommandWithOutput(runCmd)
|
||||||
|
|
|
@ -94,7 +94,7 @@ var Commands = []cli.Command{
|
||||||
|
|
||||||
if name == "" {
|
if name == "" {
|
||||||
cli.ShowCommandHelp(c, "create")
|
cli.ShowCommandHelp(c, "create")
|
||||||
log.Fatalf("You must specify a machine name")
|
log.Fatal("You must specify a machine name")
|
||||||
}
|
}
|
||||||
|
|
||||||
keyExists, err := drivers.PublicKeyExists()
|
keyExists, err := drivers.PublicKeyExists()
|
||||||
|
|
Loading…
Reference in New Issue