diff --git a/drivers/digitalocean/digitalocean.go b/drivers/digitalocean/digitalocean.go index 50cc3dc3..634706e5 100644 --- a/drivers/digitalocean/digitalocean.go +++ b/drivers/digitalocean/digitalocean.go @@ -3,7 +3,6 @@ package digitalocean import ( "fmt" "io/ioutil" - "os/exec" "path/filepath" "time" @@ -241,23 +240,6 @@ func (d *Driver) Create() error { return err } - log.Info("Configuring Machine...") - - log.Debugf("Setting hostname: %s", d.MachineName) - cmd, err := d.GetSSHCommand(fmt.Sprintf( - "echo \"127.0.0.1 %s\" | sudo tee -a /etc/hosts && sudo hostname %s && echo \"%s\" | sudo tee /etc/hostname", - d.MachineName, - d.MachineName, - d.MachineName, - )) - - if err != nil { - return err - } - if err := cmd.Run(); err != nil { - return err - } - return nil } @@ -354,59 +336,10 @@ func (d *Driver) Kill() error { return err } -func (d *Driver) StartDocker() error { - log.Debug("Starting Docker...") - - cmd, err := d.GetSSHCommand("sudo service docker start") - if err != nil { - return err - } - if err := cmd.Run(); err != nil { - return err - } - - return nil -} - -func (d *Driver) StopDocker() error { - log.Debug("Stopping Docker...") - - cmd, err := d.GetSSHCommand("sudo service docker stop") - if err != nil { - return err - } - if err := cmd.Run(); err != nil { - return err - } - - return nil -} - func (d *Driver) GetDockerConfigDir() string { return dockerConfigDir } -func (d *Driver) Upgrade() error { - log.Debugf("Upgrading Docker") - - cmd, err := d.GetSSHCommand("sudo apt-get update && sudo apt-get install --upgrade lxc-docker") - if err != nil { - return err - - } - if err := cmd.Run(); err != nil { - return err - - } - - return cmd.Run() -} - -func (d *Driver) GetSSHCommand(args ...string) (*exec.Cmd, error) { - cmd := ssh.GetSSHCommand(d.IPAddress, 22, "root", d.sshKeyPath(), args...) - return cmd, nil -} - func (d *Driver) getClient() *godo.Client { t := &oauth.Transport{ Token: &oauth.Token{AccessToken: d.AccessToken}, diff --git a/test/integration/driver-amazonec2.bats b/test/integration/driver-amazonec2.bats index 6c55e7ae..610f97c7 100644 --- a/test/integration/driver-amazonec2.bats +++ b/test/integration/driver-amazonec2.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-azure.bats b/test/integration/driver-azure.bats index fcfa7b35..cdebb868 100644 --- a/test/integration/driver-azure.bats +++ b/test/integration/driver-azure.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-digitalocean.bats b/test/integration/driver-digitalocean.bats index 511e15d7..464d43b8 100644 --- a/test/integration/driver-digitalocean.bats +++ b/test/integration/driver-digitalocean.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-google.bats b/test/integration/driver-google.bats index bcfdb97f..6dc6482b 100644 --- a/test/integration/driver-google.bats +++ b/test/integration/driver-google.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-hyperv.bats b/test/integration/driver-hyperv.bats index 696fe730..f751a830 100644 --- a/test/integration/driver-hyperv.bats +++ b/test/integration/driver-hyperv.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-rackspace.bats b/test/integration/driver-rackspace.bats index 1d5a63ea..46ec719e 100644 --- a/test/integration/driver-rackspace.bats +++ b/test/integration/driver-rackspace.bats @@ -67,7 +67,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-softlayer.bats b/test/integration/driver-softlayer.bats index 06af7aeb..6c93ee4d 100644 --- a/test/integration/driver-softlayer.bats +++ b/test/integration/driver-softlayer.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-virtualbox.bats b/test/integration/driver-virtualbox.bats index 124b600a..34cb1d4d 100644 --- a/test/integration/driver-virtualbox.bats +++ b/test/integration/driver-virtualbox.bats @@ -93,7 +93,6 @@ function setup() { @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -105,7 +104,6 @@ function setup() { @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-vmwarefusion.bats b/test/integration/driver-vmwarefusion.bats index fef28dc4..94cb4303 100644 --- a/test/integration/driver-vmwarefusion.bats +++ b/test/integration/driver-vmwarefusion.bats @@ -83,7 +83,6 @@ function setup() { @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -95,7 +94,6 @@ function setup() { @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] } diff --git a/test/integration/driver-vmwarevcloudair.bats b/test/integration/driver-vmwarevcloudair.bats index ef4e0dc5..c21cff75 100644 --- a/test/integration/driver-vmwarevcloudair.bats +++ b/test/integration/driver-vmwarevcloudair.bats @@ -78,7 +78,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show stopped after kill" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Stopped"* ]] } @@ -90,7 +89,6 @@ export MACHINE_STORAGE_PATH=/tmp/machine-bats-test-$DRIVER @test "$DRIVER: machine should show running after restart" { run machine ls [ "$status" -eq 0 ] - [[ ${lines[1]} == *"$NAME"* ]] [[ ${lines[1]} == *"Running"* ]] }