Skip to content

Commit 4af5438

Browse files
modular-magicianrileykarson
authored andcommitted
Remove outdated tests (superseded by generated ones) (#2836)
<!-- This change is generated by MagicModules. --> /cc @rileykarson
1 parent c727484 commit 4af5438

25 files changed

+2
-1215
lines changed

google/resource_cloudbuild_build_trigger_test.go renamed to google/resource_cloudbuild_trigger_test.go

-38
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,6 @@ func TestAccCloudBuildTrigger_basic(t *testing.T) {
3535
})
3636
}
3737

38-
func TestAccCloudBuildTrigger_filename(t *testing.T) {
39-
t.Parallel()
40-
41-
resource.Test(t, resource.TestCase{
42-
PreCheck: func() { testAccPreCheck(t) },
43-
Providers: testAccProviders,
44-
CheckDestroy: testAccCheckCloudbuildTriggerDestroy,
45-
Steps: []resource.TestStep{
46-
{
47-
Config: testGoogleCloudBuildTrigger_filename(),
48-
},
49-
{
50-
ResourceName: "google_cloudbuild_trigger.filename_build_trigger",
51-
ImportState: true,
52-
ImportStateVerify: true,
53-
},
54-
},
55-
})
56-
57-
}
58-
5938
func testGoogleCloudBuildTrigger_basic() string {
6039
return fmt.Sprintf(`
6140
resource "google_cloudbuild_trigger" "build_trigger" {
@@ -115,20 +94,3 @@ resource "google_cloudbuild_trigger" "build_trigger" {
11594
}
11695
`)
11796
}
118-
119-
func testGoogleCloudBuildTrigger_filename() string {
120-
return fmt.Sprintf(`
121-
resource "google_cloudbuild_trigger" "filename_build_trigger" {
122-
description = "acceptance test build trigger"
123-
trigger_template {
124-
branch_name = "master"
125-
repo_name = "some-repo"
126-
}
127-
substitutions = {
128-
_FOO = "bar"
129-
_BAZ = "qux"
130-
}
131-
filename = "cloudbuild.yaml"
132-
}
133-
`)
134-
}

google/resource_compute_address_test.go

-27
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,6 @@ import (
88
"github.com/hashicorp/terraform/helper/resource"
99
)
1010

11-
func TestAccComputeAddress_basic(t *testing.T) {
12-
t.Parallel()
13-
14-
resource.Test(t, resource.TestCase{
15-
PreCheck: func() { testAccPreCheck(t) },
16-
Providers: testAccProviders,
17-
CheckDestroy: testAccCheckComputeAddressDestroy,
18-
Steps: []resource.TestStep{
19-
{
20-
Config: testAccComputeAddress_basic(acctest.RandString(10)),
21-
},
22-
{
23-
ResourceName: "google_compute_address.foobar",
24-
ImportState: true,
25-
ImportStateVerify: true,
26-
},
27-
},
28-
})
29-
}
30-
3111
func TestAccComputeAddress_networkTier(t *testing.T) {
3212
t.Parallel()
3313

@@ -78,13 +58,6 @@ func TestAccComputeAddress_internal(t *testing.T) {
7858
})
7959
}
8060

81-
func testAccComputeAddress_basic(i string) string {
82-
return fmt.Sprintf(`
83-
resource "google_compute_address" "foobar" {
84-
name = "address-test-%s"
85-
}`, i)
86-
}
87-
8861
func testAccComputeAddress_internal(i string) string {
8962
return fmt.Sprintf(`
9063
resource "google_compute_address" "internal" {

google/resource_compute_autoscaler_test.go

-32
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,6 @@ import (
1111
"google.golang.org/api/compute/v1"
1212
)
1313

14-
func TestAccComputeAutoscaler_basic(t *testing.T) {
15-
t.Parallel()
16-
17-
var ascaler compute.Autoscaler
18-
19-
var it_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
20-
var tp_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
21-
var igm_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
22-
var autoscaler_name = fmt.Sprintf("autoscaler-test-%s", acctest.RandString(10))
23-
24-
resource.Test(t, resource.TestCase{
25-
PreCheck: func() { testAccPreCheck(t) },
26-
Providers: testAccProviders,
27-
CheckDestroy: testAccCheckComputeAutoscalerDestroy,
28-
Steps: []resource.TestStep{
29-
{
30-
Config: testAccComputeAutoscaler_basic(it_name, tp_name, igm_name, autoscaler_name),
31-
Check: resource.ComposeTestCheckFunc(
32-
testAccCheckComputeAutoscalerExists(
33-
"google_compute_autoscaler.foobar", &ascaler),
34-
),
35-
},
36-
37-
{
38-
ResourceName: "google_compute_autoscaler.foobar",
39-
ImportState: true,
40-
ImportStateVerify: true,
41-
},
42-
},
43-
})
44-
}
45-
4614
func TestAccComputeAutoscaler_update(t *testing.T) {
4715
t.Parallel()
4816

google/resource_compute_backend_bucket_test.go

-32
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,6 @@ import (
1010
"google.golang.org/api/compute/v1"
1111
)
1212

13-
func TestAccComputeBackendBucket_basic(t *testing.T) {
14-
t.Parallel()
15-
16-
backendName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
17-
storageName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
18-
var svc compute.BackendBucket
19-
20-
resource.Test(t, resource.TestCase{
21-
PreCheck: func() { testAccPreCheck(t) },
22-
Providers: testAccProviders,
23-
CheckDestroy: testAccCheckComputeBackendBucketDestroy,
24-
Steps: []resource.TestStep{
25-
{
26-
Config: testAccComputeBackendBucket_basic(backendName, storageName),
27-
Check: resource.ComposeTestCheckFunc(
28-
testAccCheckComputeBackendBucketExists(
29-
"google_compute_backend_bucket.foobar", &svc),
30-
),
31-
},
32-
{
33-
ResourceName: "google_compute_backend_bucket.foobar",
34-
ImportState: true,
35-
ImportStateVerify: true,
36-
},
37-
},
38-
})
39-
40-
if svc.BucketName != storageName {
41-
t.Errorf("Expected BucketName to be %q, got %q", storageName, svc.BucketName)
42-
}
43-
}
44-
4513
func TestAccComputeBackendBucket_basicModified(t *testing.T) {
4614
t.Parallel()
4715

google/resource_compute_disk_test.go

-29
Original file line numberDiff line numberDiff line change
@@ -205,35 +205,6 @@ func TestAccComputeDisk_imageDiffSuppressPublicVendorsFamilyNames(t *testing.T)
205205
}
206206
}
207207

208-
func TestAccComputeDisk_basic(t *testing.T) {
209-
t.Parallel()
210-
211-
diskName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
212-
var disk compute.Disk
213-
214-
resource.Test(t, resource.TestCase{
215-
PreCheck: func() { testAccPreCheck(t) },
216-
Providers: testAccProviders,
217-
CheckDestroy: testAccCheckComputeDiskDestroy,
218-
Steps: []resource.TestStep{
219-
{
220-
Config: testAccComputeDisk_basic(diskName),
221-
Check: resource.ComposeTestCheckFunc(
222-
testAccCheckComputeDiskExists(
223-
"google_compute_disk.foobar", getTestProjectFromEnv(), &disk),
224-
testAccCheckComputeDiskHasLabel(&disk, "my-label", "my-label-value"),
225-
testAccCheckComputeDiskHasLabelFingerprint(&disk, "google_compute_disk.foobar"),
226-
),
227-
},
228-
{
229-
ResourceName: "google_compute_disk.foobar",
230-
ImportState: true,
231-
ImportStateVerify: true,
232-
},
233-
},
234-
})
235-
}
236-
237208
func TestAccComputeDisk_timeout(t *testing.T) {
238209
t.Parallel()
239210

google/resource_compute_firewall_test.go

-29
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,6 @@ import (
1313
"google.golang.org/api/compute/v1"
1414
)
1515

16-
func TestAccComputeFirewall_basic(t *testing.T) {
17-
t.Parallel()
18-
19-
var firewall compute.Firewall
20-
networkName := fmt.Sprintf("firewall-test-%s", acctest.RandString(10))
21-
firewallName := fmt.Sprintf("firewall-test-%s", acctest.RandString(10))
22-
23-
resource.Test(t, resource.TestCase{
24-
PreCheck: func() { testAccPreCheck(t) },
25-
Providers: testAccProviders,
26-
CheckDestroy: testAccCheckComputeFirewallDestroy,
27-
Steps: []resource.TestStep{
28-
{
29-
Config: testAccComputeFirewall_basic(networkName, firewallName),
30-
Check: resource.ComposeTestCheckFunc(
31-
testAccCheckComputeFirewallExists(
32-
"google_compute_firewall.foobar", &firewall),
33-
testAccCheckComputeFirewallApiVersion(&firewall),
34-
),
35-
},
36-
{
37-
ResourceName: "google_compute_firewall.foobar",
38-
ImportState: true,
39-
ImportStateVerify: true,
40-
},
41-
},
42-
})
43-
}
44-
4516
func TestAccComputeFirewall_update(t *testing.T) {
4617
t.Parallel()
4718

google/resource_compute_global_address_test.go

-37
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,6 @@ import (
1111
"google.golang.org/api/compute/v1"
1212
)
1313

14-
func TestAccComputeGlobalAddress_basic(t *testing.T) {
15-
t.Parallel()
16-
17-
var addr compute.Address
18-
19-
resource.Test(t, resource.TestCase{
20-
PreCheck: func() { testAccPreCheck(t) },
21-
Providers: testAccProviders,
22-
CheckDestroy: testAccCheckComputeGlobalAddressDestroy,
23-
Steps: []resource.TestStep{
24-
{
25-
Config: testAccComputeGlobalAddress_basic(),
26-
Check: resource.ComposeTestCheckFunc(
27-
testAccCheckComputeGlobalAddressExists(
28-
"google_compute_global_address.foobar", &addr),
29-
30-
// implicitly IPV4 - if we don't send an ip_version, we don't get one back.
31-
testAccCheckComputeGlobalAddressIpVersion("google_compute_global_address.foobar", ""),
32-
),
33-
},
34-
{
35-
ResourceName: "google_compute_global_address.foobar",
36-
ImportState: true,
37-
ImportStateVerify: true,
38-
},
39-
},
40-
})
41-
}
42-
4314
func TestAccComputeGlobalAddress_ipv6(t *testing.T) {
4415
t.Parallel()
4516

@@ -122,14 +93,6 @@ func testAccCheckComputeGlobalAddressIpVersion(n, version string) resource.TestC
12293
}
12394
}
12495

125-
func testAccComputeGlobalAddress_basic() string {
126-
return fmt.Sprintf(`
127-
resource "google_compute_global_address" "foobar" {
128-
name = "address-test-%s"
129-
description = "Created for Terraform acceptance testing"
130-
}`, acctest.RandString(10))
131-
}
132-
13396
func testAccComputeGlobalAddress_ipv6() string {
13497
return fmt.Sprintf(`
13598
resource "google_compute_global_address" "foobar" {

google/resource_compute_http_health_check_test.go

-48
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,6 @@ import (
1010
"google.golang.org/api/compute/v1"
1111
)
1212

13-
func TestAccComputeHttpHealthCheck_basic(t *testing.T) {
14-
t.Parallel()
15-
16-
var healthCheck compute.HttpHealthCheck
17-
18-
hhckName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
19-
20-
resource.Test(t, resource.TestCase{
21-
PreCheck: func() { testAccPreCheck(t) },
22-
Providers: testAccProviders,
23-
CheckDestroy: testAccCheckComputeHttpHealthCheckDestroy,
24-
Steps: []resource.TestStep{
25-
{
26-
Config: testAccComputeHttpHealthCheck_basic(hhckName),
27-
Check: resource.ComposeTestCheckFunc(
28-
testAccCheckComputeHttpHealthCheckExists(
29-
"google_compute_http_health_check.foobar", &healthCheck),
30-
testAccCheckComputeHttpHealthCheckRequestPath(
31-
"/health_check", &healthCheck),
32-
testAccCheckComputeHttpHealthCheckThresholds(
33-
3, 3, &healthCheck),
34-
),
35-
},
36-
{
37-
ResourceName: "google_compute_http_health_check.foobar",
38-
ImportState: true,
39-
ImportStateVerify: true,
40-
},
41-
},
42-
})
43-
}
44-
4513
func TestAccComputeHttpHealthCheck_update(t *testing.T) {
4614
t.Parallel()
4715

@@ -133,22 +101,6 @@ func testAccCheckComputeHttpHealthCheckThresholds(healthy, unhealthy int64, heal
133101
}
134102
}
135103

136-
func testAccComputeHttpHealthCheck_basic(hhckName string) string {
137-
return fmt.Sprintf(`
138-
resource "google_compute_http_health_check" "foobar" {
139-
name = "%s"
140-
check_interval_sec = 3
141-
description = "Resource created for Terraform acceptance testing"
142-
healthy_threshold = 3
143-
host = "foobar"
144-
port = "80"
145-
request_path = "/health_check"
146-
timeout_sec = 2
147-
unhealthy_threshold = 3
148-
}
149-
`, hhckName)
150-
}
151-
152104
func testAccComputeHttpHealthCheck_update1(hhckName string) string {
153105
return fmt.Sprintf(`
154106
resource "google_compute_http_health_check" "foobar" {

0 commit comments

Comments
 (0)