terraform/builtin/providers/digitalocean/resource_digitalocean_float...

125 lines
3.1 KiB
Go
Raw Normal View History

package digitalocean
import (
"fmt"
"testing"
"github.com/digitalocean/godo"
provider/digitalocean: Update digital ocean acceptance tests Digital Ocean doesn't let you upload multiple SSH keys regardless of key_name, but on the fingerprint of the key contents. Which broke all of our tests when ran in parallel. These changes maintain our acctest validity, and still let them pass. ``` ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Basic' out='=== RUN TestAccDigitalOceanDroplet_Basic|n--- PASS: TestAccDigitalOceanDroplet_Basic (47.33s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Basic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:19:59.898' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateTags' out='=== RUN TestAccDigitalOceanDroplet_UpdateTags|n--- PASS: TestAccDigitalOceanDroplet_UpdateTags (50.96s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateTags' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:03.516' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_importBasic' out='=== RUN TestAccDigitalOceanDroplet_importBasic|n--- PASS: TestAccDigitalOceanDroplet_importBasic (56.78s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_importBasic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:09.335' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out='=== RUN TestAccDigitalOceanDroplet_PrivateNetworkingIpv6|n--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (57.60s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:10.157' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_withSSH' out='=== RUN TestAccDigitalOceanDroplet_withSSH|n--- PASS: TestAccDigitalOceanDroplet_withSSH (59.76s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_withSSH' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:12.326' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Update' out='=== RUN TestAccDigitalOceanDroplet_Update|n--- PASS: TestAccDigitalOceanDroplet_Update (83.65s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Update' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:36.213' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateUserData' out='=== RUN TestAccDigitalOceanDroplet_UpdateUserData|n--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (103.18s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateUserData' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:55.738' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out='=== RUN TestAccDigitalOceanDroplet_ResizeWithOutDisk|n--- PASS: TestAccDigitalOceanDroplet_ResizeWithOutDisk (118.98s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:21:11.558' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ```
2017-02-10 22:41:35 +01:00
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
)
func TestAccDigitalOceanFloatingIP_Region(t *testing.T) {
var floatingIP godo.FloatingIP
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckDigitalOceanFloatingIPDestroy,
Steps: []resource.TestStep{
{
Config: testAccCheckDigitalOceanFloatingIPConfig_region,
Check: resource.ComposeTestCheckFunc(
testAccCheckDigitalOceanFloatingIPExists("digitalocean_floating_ip.foobar", &floatingIP),
resource.TestCheckResourceAttr(
"digitalocean_floating_ip.foobar", "region", "nyc3"),
),
},
},
})
}
func TestAccDigitalOceanFloatingIP_Droplet(t *testing.T) {
var floatingIP godo.FloatingIP
provider/digitalocean: Update digital ocean acceptance tests Digital Ocean doesn't let you upload multiple SSH keys regardless of key_name, but on the fingerprint of the key contents. Which broke all of our tests when ran in parallel. These changes maintain our acctest validity, and still let them pass. ``` ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Basic' out='=== RUN TestAccDigitalOceanDroplet_Basic|n--- PASS: TestAccDigitalOceanDroplet_Basic (47.33s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Basic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:19:59.898' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateTags' out='=== RUN TestAccDigitalOceanDroplet_UpdateTags|n--- PASS: TestAccDigitalOceanDroplet_UpdateTags (50.96s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateTags' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:03.516' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_importBasic' out='=== RUN TestAccDigitalOceanDroplet_importBasic|n--- PASS: TestAccDigitalOceanDroplet_importBasic (56.78s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_importBasic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:09.335' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out='=== RUN TestAccDigitalOceanDroplet_PrivateNetworkingIpv6|n--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (57.60s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:10.157' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_withSSH' out='=== RUN TestAccDigitalOceanDroplet_withSSH|n--- PASS: TestAccDigitalOceanDroplet_withSSH (59.76s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_withSSH' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:12.326' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Update' out='=== RUN TestAccDigitalOceanDroplet_Update|n--- PASS: TestAccDigitalOceanDroplet_Update (83.65s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Update' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:36.213' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateUserData' out='=== RUN TestAccDigitalOceanDroplet_UpdateUserData|n--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (103.18s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateUserData' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:55.738' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out='=== RUN TestAccDigitalOceanDroplet_ResizeWithOutDisk|n--- PASS: TestAccDigitalOceanDroplet_ResizeWithOutDisk (118.98s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:21:11.558' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ```
2017-02-10 22:41:35 +01:00
rInt := acctest.RandInt()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckDigitalOceanFloatingIPDestroy,
Steps: []resource.TestStep{
{
provider/digitalocean: Update digital ocean acceptance tests Digital Ocean doesn't let you upload multiple SSH keys regardless of key_name, but on the fingerprint of the key contents. Which broke all of our tests when ran in parallel. These changes maintain our acctest validity, and still let them pass. ``` ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Basic' out='=== RUN TestAccDigitalOceanDroplet_Basic|n--- PASS: TestAccDigitalOceanDroplet_Basic (47.33s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Basic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:19:59.898' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateTags' out='=== RUN TestAccDigitalOceanDroplet_UpdateTags|n--- PASS: TestAccDigitalOceanDroplet_UpdateTags (50.96s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateTags' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:03.516' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_importBasic' out='=== RUN TestAccDigitalOceanDroplet_importBasic|n--- PASS: TestAccDigitalOceanDroplet_importBasic (56.78s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_importBasic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:09.335' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out='=== RUN TestAccDigitalOceanDroplet_PrivateNetworkingIpv6|n--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (57.60s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:10.157' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_withSSH' out='=== RUN TestAccDigitalOceanDroplet_withSSH|n--- PASS: TestAccDigitalOceanDroplet_withSSH (59.76s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_withSSH' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:12.326' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Update' out='=== RUN TestAccDigitalOceanDroplet_Update|n--- PASS: TestAccDigitalOceanDroplet_Update (83.65s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Update' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:36.213' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateUserData' out='=== RUN TestAccDigitalOceanDroplet_UpdateUserData|n--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (103.18s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateUserData' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:55.738' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out='=== RUN TestAccDigitalOceanDroplet_ResizeWithOutDisk|n--- PASS: TestAccDigitalOceanDroplet_ResizeWithOutDisk (118.98s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:21:11.558' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ```
2017-02-10 22:41:35 +01:00
Config: testAccCheckDigitalOceanFloatingIPConfig_droplet(rInt),
Check: resource.ComposeTestCheckFunc(
testAccCheckDigitalOceanFloatingIPExists("digitalocean_floating_ip.foobar", &floatingIP),
resource.TestCheckResourceAttr(
"digitalocean_floating_ip.foobar", "region", "nyc3"),
),
},
},
})
}
func testAccCheckDigitalOceanFloatingIPDestroy(s *terraform.State) error {
client := testAccProvider.Meta().(*godo.Client)
for _, rs := range s.RootModule().Resources {
if rs.Type != "digitalocean_floating_ip" {
continue
}
// Try to find the key
_, _, err := client.FloatingIPs.Get(rs.Primary.ID)
if err == nil {
return fmt.Errorf("Floating IP still exists")
}
}
return nil
}
func testAccCheckDigitalOceanFloatingIPExists(n string, floatingIP *godo.FloatingIP) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]
if !ok {
return fmt.Errorf("Not found: %s", n)
}
if rs.Primary.ID == "" {
return fmt.Errorf("No Record ID is set")
}
client := testAccProvider.Meta().(*godo.Client)
// Try to find the FloatingIP
foundFloatingIP, _, err := client.FloatingIPs.Get(rs.Primary.ID)
if err != nil {
return err
}
if foundFloatingIP.IP != rs.Primary.ID {
return fmt.Errorf("Record not found")
}
*floatingIP = *foundFloatingIP
return nil
}
}
var testAccCheckDigitalOceanFloatingIPConfig_region = `
resource "digitalocean_floating_ip" "foobar" {
region = "nyc3"
}`
provider/digitalocean: Update digital ocean acceptance tests Digital Ocean doesn't let you upload multiple SSH keys regardless of key_name, but on the fingerprint of the key contents. Which broke all of our tests when ran in parallel. These changes maintain our acctest validity, and still let them pass. ``` ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Basic' out='=== RUN TestAccDigitalOceanDroplet_Basic|n--- PASS: TestAccDigitalOceanDroplet_Basic (47.33s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Basic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:19:59.898' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateTags' out='=== RUN TestAccDigitalOceanDroplet_UpdateTags|n--- PASS: TestAccDigitalOceanDroplet_UpdateTags (50.96s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateTags' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:03.516' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_importBasic' out='=== RUN TestAccDigitalOceanDroplet_importBasic|n--- PASS: TestAccDigitalOceanDroplet_importBasic (56.78s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_importBasic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:09.335' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out='=== RUN TestAccDigitalOceanDroplet_PrivateNetworkingIpv6|n--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (57.60s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:10.157' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_withSSH' out='=== RUN TestAccDigitalOceanDroplet_withSSH|n--- PASS: TestAccDigitalOceanDroplet_withSSH (59.76s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_withSSH' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:12.326' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Update' out='=== RUN TestAccDigitalOceanDroplet_Update|n--- PASS: TestAccDigitalOceanDroplet_Update (83.65s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Update' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:36.213' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateUserData' out='=== RUN TestAccDigitalOceanDroplet_UpdateUserData|n--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (103.18s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateUserData' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:55.738' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out='=== RUN TestAccDigitalOceanDroplet_ResizeWithOutDisk|n--- PASS: TestAccDigitalOceanDroplet_ResizeWithOutDisk (118.98s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:21:11.558' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ```
2017-02-10 22:41:35 +01:00
func testAccCheckDigitalOceanFloatingIPConfig_droplet(rInt int) string {
return fmt.Sprintf(`
resource "digitalocean_droplet" "foobar" {
provider/digitalocean: Update digital ocean acceptance tests Digital Ocean doesn't let you upload multiple SSH keys regardless of key_name, but on the fingerprint of the key contents. Which broke all of our tests when ran in parallel. These changes maintain our acctest validity, and still let them pass. ``` ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Basic' out='=== RUN TestAccDigitalOceanDroplet_Basic|n--- PASS: TestAccDigitalOceanDroplet_Basic (47.33s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Basic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:19:59.898' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateTags' out='=== RUN TestAccDigitalOceanDroplet_UpdateTags|n--- PASS: TestAccDigitalOceanDroplet_UpdateTags (50.96s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateTags' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:03.516' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_importBasic' out='=== RUN TestAccDigitalOceanDroplet_importBasic|n--- PASS: TestAccDigitalOceanDroplet_importBasic (56.78s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_importBasic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:09.335' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out='=== RUN TestAccDigitalOceanDroplet_PrivateNetworkingIpv6|n--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (57.60s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:10.157' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_withSSH' out='=== RUN TestAccDigitalOceanDroplet_withSSH|n--- PASS: TestAccDigitalOceanDroplet_withSSH (59.76s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_withSSH' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:12.326' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Update' out='=== RUN TestAccDigitalOceanDroplet_Update|n--- PASS: TestAccDigitalOceanDroplet_Update (83.65s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Update' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:36.213' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateUserData' out='=== RUN TestAccDigitalOceanDroplet_UpdateUserData|n--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (103.18s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateUserData' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:55.738' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out='=== RUN TestAccDigitalOceanDroplet_ResizeWithOutDisk|n--- PASS: TestAccDigitalOceanDroplet_ResizeWithOutDisk (118.98s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:21:11.558' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ```
2017-02-10 22:41:35 +01:00
name = "baz-%d"
size = "1gb"
image = "centos-7-x64"
region = "nyc3"
ipv6 = true
private_networking = true
}
resource "digitalocean_floating_ip" "foobar" {
droplet_id = "${digitalocean_droplet.foobar.id}"
region = "${digitalocean_droplet.foobar.region}"
provider/digitalocean: Update digital ocean acceptance tests Digital Ocean doesn't let you upload multiple SSH keys regardless of key_name, but on the fingerprint of the key contents. Which broke all of our tests when ran in parallel. These changes maintain our acctest validity, and still let them pass. ``` ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Basic' out='=== RUN TestAccDigitalOceanDroplet_Basic|n--- PASS: TestAccDigitalOceanDroplet_Basic (47.33s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Basic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:19:59.898' name='TestAccDigitalOceanDroplet_Basic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.532' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateTags' out='=== RUN TestAccDigitalOceanDroplet_UpdateTags|n--- PASS: TestAccDigitalOceanDroplet_UpdateTags (50.96s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateTags' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:03.516' name='TestAccDigitalOceanDroplet_UpdateTags'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_importBasic' out='=== RUN TestAccDigitalOceanDroplet_importBasic|n--- PASS: TestAccDigitalOceanDroplet_importBasic (56.78s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_importBasic' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:09.335' name='TestAccDigitalOceanDroplet_importBasic'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out='=== RUN TestAccDigitalOceanDroplet_PrivateNetworkingIpv6|n--- PASS: TestAccDigitalOceanDroplet_PrivateNetworkingIpv6 (57.60s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:10.157' name='TestAccDigitalOceanDroplet_PrivateNetworkingIpv6'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_withSSH' out='=== RUN TestAccDigitalOceanDroplet_withSSH|n--- PASS: TestAccDigitalOceanDroplet_withSSH (59.76s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_withSSH' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:12.326' name='TestAccDigitalOceanDroplet_withSSH'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_Update' out='=== RUN TestAccDigitalOceanDroplet_Update|n--- PASS: TestAccDigitalOceanDroplet_Update (83.65s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_Update' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:36.213' name='TestAccDigitalOceanDroplet_Update'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.530' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_UpdateUserData' out='=== RUN TestAccDigitalOceanDroplet_UpdateUserData|n--- PASS: TestAccDigitalOceanDroplet_UpdateUserData (103.18s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_UpdateUserData' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:20:55.738' name='TestAccDigitalOceanDroplet_UpdateUserData'] ##teamcity[testStarted timestamp='2017-02-10T16:19:12.533' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ##teamcity[testStdOut name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out='=== RUN TestAccDigitalOceanDroplet_ResizeWithOutDisk|n--- PASS: TestAccDigitalOceanDroplet_ResizeWithOutDisk (118.98s)|nPASS|n'] ##teamcity[testStdErr name='TestAccDigitalOceanDroplet_ResizeWithOutDisk' out=''] ##teamcity[testFinished timestamp='2017-02-10T16:21:11.558' name='TestAccDigitalOceanDroplet_ResizeWithOutDisk'] ```
2017-02-10 22:41:35 +01:00
}`, rInt)
}