mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-08 19:18:30 +00:00
![Joe Selman](/assets/img/avatar_default.png)
This reverts commit 8ab9d96d25
and revives
the original commit that adds t.Parallel to all acceptance tests. It
turns out test failures were unrelated to this change (rather, they were
related to quota issues).
72 lines
1.6 KiB
Go
72 lines
1.6 KiB
Go
package google
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccComputeNetwork_importBasic(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
resourceName := "google_compute_network.foobar"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckComputeNetworkDestroy,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: testAccComputeNetwork_basic,
|
|
}, {
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
//ImportStateVerifyIgnore: []string{"ipv4_range", "name"},
|
|
},
|
|
},
|
|
})
|
|
}
|
|
|
|
func TestAccComputeNetwork_importAuto_subnet(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
resourceName := "google_compute_network.bar"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckComputeNetworkDestroy,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: testAccComputeNetwork_auto_subnet,
|
|
}, {
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|
|
|
|
func TestAccComputeNetwork_importCustom_subnet(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
resourceName := "google_compute_network.baz"
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckComputeNetworkDestroy,
|
|
Steps: []resource.TestStep{
|
|
{
|
|
Config: testAccComputeNetwork_custom_subnet,
|
|
}, {
|
|
ResourceName: resourceName,
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|