Skip to content

Commit

Permalink
Empty reservations must ignore empty (#3541)
Browse files Browse the repository at this point in the history
  • Loading branch information
slevenick authored May 20, 2020
1 parent 47e1d5e commit 9c4f020
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ resource "google_bigquery_reservation" "<%= ctx[:primary_resource_id] %>" {
// Set to 0 for testing purposes
// In reality this would be larger than zero
slot_capacity = 0
ignore_idle_slots = true
ignore_idle_slots = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)

func TestAccBigqueryReservationReservation_bigqueryReservationUpdate(t *testing.T) {
func TestAccBigqueryReservationReservation_bigqueryReservation(t *testing.T) {
t.Parallel()

location := "asia-northeast1"
Expand All @@ -33,33 +33,12 @@ func TestAccBigqueryReservationReservation_bigqueryReservationUpdate(t *testing.
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccBigqueryReservationReservation_bigqueryReservationUpdate(context),
},
{
ResourceName: "google_bigquery_reservation.reservation",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func testAccBigqueryReservationReservation_bigqueryReservationBasic(context map[string]interface{}) string {
return Nprintf(`
resource "google_bigquery_reservation" "reservation" {
name = "reservation%{random_suffix}"
location = "%{location}"
// Set to 0 for testing purposes
// In reality this would be larger than zero
slot_capacity = 0
ignore_idle_slots = true
}
`, context)
}

func testAccBigqueryReservationReservation_bigqueryReservationUpdate(context map[string]interface{}) string {
return Nprintf(`
resource "google_bigquery_reservation" "reservation" {
name = "reservation%{random_suffix}"
location = "%{location}"
Expand Down

0 comments on commit 9c4f020

Please sign in to comment.