Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty reservations must ignore empty #3541

Merged
merged 1 commit into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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