Skip to content

Commit

Permalink
Instance sweeper (#3401) (#6173)
Browse files Browse the repository at this point in the history
* compute instance sweeper

* test prefix in other tests

* compile

* use zone name

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Apr 22, 2020
1 parent 03a64cc commit 7eebfe3
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 107 deletions.
3 changes: 3 additions & 0 deletions .changelog/3401.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
2 changes: 1 addition & 1 deletion google/data_source_google_compute_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func TestAccDataSourceComputeInstance_basic(t *testing.T) {
t.Parallel()

instanceName := fmt.Sprintf("data-instance-test-%s", randString(t, 10))
instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10))

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down
16 changes: 8 additions & 8 deletions google/resource_compute_instance_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestAccComputeInstanceGroup_basic(t *testing.T) {

var instanceGroup compute.InstanceGroup
var resourceName = "google_compute_instance_group.basic"
var instanceName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var instanceName = fmt.Sprintf("tf-test-%s", randString(t, 10))
var zone = "us-central1-c"

vcrTest(t, resource.TestCase{
Expand Down Expand Up @@ -50,10 +50,10 @@ func TestAccComputeInstanceGroup_basic(t *testing.T) {
func TestAccComputeInstanceGroup_rename(t *testing.T) {
t.Parallel()

var instanceName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var instanceGroupName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var backendName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var healthName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var instanceName = fmt.Sprintf("tf-test-%s", randString(t, 10))
var instanceGroupName = fmt.Sprintf("tf-test-%s", randString(t, 10))
var backendName = fmt.Sprintf("tf-test-%s", randString(t, 10))
var healthName = fmt.Sprintf("tf-test-%s", randString(t, 10))

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -84,7 +84,7 @@ func TestAccComputeInstanceGroup_update(t *testing.T) {
t.Parallel()

var instanceGroup compute.InstanceGroup
var instanceName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var instanceName = fmt.Sprintf("tf-test-%s", randString(t, 10))

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -125,7 +125,7 @@ func TestAccComputeInstanceGroup_outOfOrderInstances(t *testing.T) {
t.Parallel()

var instanceGroup compute.InstanceGroup
var instanceName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var instanceName = fmt.Sprintf("tf-test-%s", randString(t, 10))

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -147,7 +147,7 @@ func TestAccComputeInstanceGroup_network(t *testing.T) {
t.Parallel()

var instanceGroup compute.InstanceGroup
var instanceName = fmt.Sprintf("instancegroup-test-%s", randString(t, 10))
var instanceName = fmt.Sprintf("tf-test-%s", randString(t, 10))

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down
Loading

0 comments on commit 7eebfe3

Please sign in to comment.