Skip to content

Commit

Permalink
testing: Use supported OS for Droplet image slug. (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething authored Aug 5, 2022
1 parent 5acd3d3 commit 53788a8
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions digitalocean/datasource_digitalocean_droplet_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ resource "digitalocean_droplet" "bar" {
region = "lon1"
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
}
resource "digitalocean_droplet_snapshot" "bar" {
Expand Down Expand Up @@ -148,7 +148,7 @@ const testAccCheckDataSourceDigitalOceanDropletSnapshot_basic = `
resource "digitalocean_droplet" "foo" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down
14 changes: 7 additions & 7 deletions digitalocean/datasource_digitalocean_droplet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data "digitalocean_droplet" "foobar" {
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "name", name),
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "image", "centos-7-x64"),
"data.digitalocean_droplet.foobar", "image", "ubuntu-22-04-x64"),
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "region", "nyc3"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestAccDataSourceDigitalOceanDroplet_BasicById(t *testing.T) {
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "name", name),
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "image", "centos-7-x64"),
"data.digitalocean_droplet.foobar", "image", "ubuntu-22-04-x64"),
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "region", "nyc3"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -103,7 +103,7 @@ func TestAccDataSourceDigitalOceanDroplet_BasicByTag(t *testing.T) {
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "name", name),
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "image", "centos-7-x64"),
"data.digitalocean_droplet.foobar", "image", "ubuntu-22-04-x64"),
resource.TestCheckResourceAttr(
"data.digitalocean_droplet.foobar", "region", "nyc3"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -165,7 +165,7 @@ resource "digitalocean_vpc" "foobar" {
resource "digitalocean_droplet" "foo" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
vpc_uuid = digitalocean_vpc.foobar.id
Expand All @@ -177,7 +177,7 @@ func testAccCheckDataSourceDigitalOceanDropletConfig_basicById(name string) stri
resource "digitalocean_droplet" "foo" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
}
Expand All @@ -197,7 +197,7 @@ resource "digitalocean_tag" "foo" {
resource "digitalocean_droplet" "foo" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
tags = [digitalocean_tag.foo.id]
Expand All @@ -214,7 +214,7 @@ resource "digitalocean_tag" "foo" {
resource "digitalocean_droplet" "foo" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
tags = [digitalocean_tag.foo.id]
Expand Down
4 changes: 2 additions & 2 deletions digitalocean/datasource_digitalocean_droplets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ func TestAccDataSourceDigitalOceanDroplets_Basic(t *testing.T) {
resource "digitalocean_droplet" "foo" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
resource "digitalocean_droplet" "bar" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
`, name1, name2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ resource "digitalocean_database_cluster" "foobar" {
resource "digitalocean_droplet" "foobar" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const testAccCheckDigitalOceanDropletSnapshotConfig_basic = `
resource "digitalocean_droplet" "foo" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
user_data = "foobar"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ resource "digitalocean_droplet" "foobar" {
count = 2
name = "tf-acc-test-${count.index}"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -144,7 +144,7 @@ resource "digitalocean_droplet" "foobar" {
count = 2
name = "tf-acc-test-${count.index}"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -165,7 +165,7 @@ resource "digitalocean_droplet" "foobar" {
count = 2
name = "tf-acc-test-${count.index}"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -174,7 +174,7 @@ resource "digitalocean_droplet" "foobar" {

var testAccCheckDigitalOceanFloatingIPAssignmentConfig_createBeforeDestroy = `
resource "digitalocean_droplet" "foobar" {
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
name = "tf-acc-test"
region = "nyc3"
size = "s-1vcpu-1gb"
Expand Down
6 changes: 3 additions & 3 deletions digitalocean/resource_digitalocean_floating_ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func testAccCheckDigitalOceanFloatingIPConfig_droplet(rInt int) string {
resource "digitalocean_droplet" "foobar" {
name = "tf-acc-test-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -179,7 +179,7 @@ func testAccCheckDigitalOceanFloatingIPConfig_Reassign(rInt int) string {
resource "digitalocean_droplet" "baz" {
name = "tf-acc-test-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -196,7 +196,7 @@ func testAccCheckDigitalOceanFloatingIPConfig_Unassign(rInt int) string {
resource "digitalocean_droplet" "baz" {
name = "tf-acc-test-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand Down
16 changes: 8 additions & 8 deletions digitalocean/resource_digitalocean_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_basic(rInt int) string {
resource "digitalocean_droplet" "foobar" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down Expand Up @@ -738,14 +738,14 @@ func testAccCheckDigitalOceanLoadbalancerConfig_updated(rInt int) string {
resource "digitalocean_droplet" "foobar" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
resource "digitalocean_droplet" "foo" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down Expand Up @@ -783,7 +783,7 @@ resource "digitalocean_tag" "barbaz" {
resource "digitalocean_droplet" "foobar" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
tags = ["${digitalocean_tag.barbaz.id}"]
}
Expand Down Expand Up @@ -816,7 +816,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_minimal(rInt int) string {
resource "digitalocean_droplet" "foobar" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand All @@ -842,7 +842,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_minimalUDP(rInt int) string {
resource "digitalocean_droplet" "foobar" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand All @@ -868,7 +868,7 @@ func testAccCheckDigitalOceanLoadbalancerConfig_stickySessions(rInt int) string
resource "digitalocean_droplet" "foobar" {
name = "foo-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down Expand Up @@ -990,7 +990,7 @@ resource "digitalocean_vpc" "foobar" {
resource "digitalocean_droplet" "foobar" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
vpc_uuid = digitalocean_vpc.foobar.id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "digitalocean_project" "foo" {
resource "digitalocean_droplet" "foobar" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
user_data = "foobar"
}
Expand Down
2 changes: 1 addition & 1 deletion digitalocean/resource_digitalocean_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func fixtureCreateWithDropletResource(dropletName, name string) string {
resource "digitalocean_droplet" "foobar" {
name = "%s"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
user_data = "foobar"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ resource "digitalocean_droplet" "foobar" {
count = 2
name = "tf-acc-test-${count.index}"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -144,7 +144,7 @@ resource "digitalocean_droplet" "foobar" {
count = 2
name = "tf-acc-test-${count.index}"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -165,7 +165,7 @@ resource "digitalocean_droplet" "foobar" {
count = 2
name = "tf-acc-test-${count.index}"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -174,7 +174,7 @@ resource "digitalocean_droplet" "foobar" {

var testAccCheckDigitalOceanReservedIPAssignmentConfig_createBeforeDestroy = `
resource "digitalocean_droplet" "foobar" {
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
name = "tf-acc-test"
region = "nyc3"
size = "s-1vcpu-1gb"
Expand Down
6 changes: 3 additions & 3 deletions digitalocean/resource_digitalocean_reserved_ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func testAccCheckDigitalOceanReservedIPConfig_droplet(rInt int) string {
resource "digitalocean_droplet" "foobar" {
name = "tf-acc-test-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -179,7 +179,7 @@ func testAccCheckDigitalOceanReservedIPConfig_Reassign(rInt int) string {
resource "digitalocean_droplet" "baz" {
name = "tf-acc-test-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand All @@ -196,7 +196,7 @@ func testAccCheckDigitalOceanReservedIPConfig_Unassign(rInt int) string {
resource "digitalocean_droplet" "baz" {
name = "tf-acc-test-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
ipv6 = true
private_networking = true
Expand Down
6 changes: 3 additions & 3 deletions digitalocean/resource_digitalocean_volume_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ resource "digitalocean_volume" "foobar" {
resource "digitalocean_droplet" "foobar" {
name = "baz-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc1"
}
Expand Down Expand Up @@ -255,7 +255,7 @@ resource "digitalocean_volume" "barfoo" {
resource "digitalocean_droplet" "foobar" {
name = "baz-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc1"
}
Expand Down Expand Up @@ -289,7 +289,7 @@ resource "digitalocean_volume" "foobar_second" {
resource "digitalocean_droplet" "foobar" {
name = "baz-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc1"
}
Expand Down
4 changes: 2 additions & 2 deletions digitalocean/resource_digitalocean_volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ resource "digitalocean_volume" "foobar" {
resource "digitalocean_droplet" "foobar" {
name = "baz-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc1"
ipv6 = true
private_networking = true
Expand Down Expand Up @@ -337,7 +337,7 @@ resource "digitalocean_volume" "foobar" {
resource "digitalocean_droplet" "foobar" {
name = "baz-%d"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc1"
ipv6 = true
private_networking = true
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/database_firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "digitalocean_database_firewall" "example-fw" {
resource "digitalocean_droplet" "web" {
name = "web-01"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/droplet_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Provides a resource which can be used to create a snapshot from an existing Digi
resource "digitalocean_droplet" "web" {
name = "web-01"
size = "s-1vcpu-1gb"
image = "centos-7-x64"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
Expand Down
Loading

0 comments on commit 53788a8

Please sign in to comment.