provider/digitalocean: Fix faililng acceptance test (#11887)

The volume_Droplet test was failing from an incorrect fix pushed on Friday. Fixes the failing test.

```
$ make testacc TEST=./builtin/providers/digitalocean TESTARGS='-run=TestAccDigitalOceanVolume_Droplet'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/11 17:55:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/digitalocean -v -run=TestAccDigitalOceanVolume_Droplet -timeout 120m
=== RUN   TestAccDigitalOceanVolume_Droplet
--- PASS: TestAccDigitalOceanVolume_Droplet (52.78s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/digitalocean   52.797s
```
This commit is contained in:
Jake Champlin 2017-02-12 14:57:44 -05:00 committed by Paul Stack
parent 705e3541d0
commit 3fba1160fe
1 changed files with 2 additions and 6 deletions

View File

@ -105,10 +105,7 @@ func TestAccDigitalOceanVolume_Droplet(t *testing.T) {
CheckDestroy: testAccCheckDigitalOceanVolumeDestroy, CheckDestroy: testAccCheckDigitalOceanVolumeDestroy,
Steps: []resource.TestStep{ Steps: []resource.TestStep{
{ {
Config: fmt.Sprintf( Config: testAccCheckDigitalOceanVolumeConfig_droplet(rInt, volume.Name),
testAccCheckDigitalOceanVolumeConfig_droplet(rInt, volume.Name),
testAccValidPublicKey, volume.Name,
),
Check: resource.ComposeTestCheckFunc( Check: resource.ComposeTestCheckFunc(
testAccCheckDigitalOceanVolumeExists("digitalocean_volume.foobar", &volume), testAccCheckDigitalOceanVolumeExists("digitalocean_volume.foobar", &volume),
testAccCheckDigitalOceanDropletExists("digitalocean_droplet.foobar", &droplet), testAccCheckDigitalOceanDropletExists("digitalocean_droplet.foobar", &droplet),
@ -133,11 +130,10 @@ resource "digitalocean_volume" "foobar" {
resource "digitalocean_droplet" "foobar" { resource "digitalocean_droplet" "foobar" {
name = "baz-%d" name = "baz-%d"
size = "1gb" size = "1gb"
image = "coreos-stable" image = "centos-7-x64"
region = "nyc1" region = "nyc1"
ipv6 = true ipv6 = true
private_networking = true private_networking = true
ssh_keys = ["${digitalocean_ssh_key.foobar.id}"]
volume_ids = ["${digitalocean_volume.foobar.id}"] volume_ids = ["${digitalocean_volume.foobar.id}"]
}`, vName, rInt) }`, vName, rInt)
} }