| // Copyright (c) HashiCorp, Inc. |
| // SPDX-License-Identifier: MPL-2.0 |
| package looker_test |
| |
| import ( |
| "testing" |
| |
| "github.com/hashicorp/terraform-plugin-testing/helper/resource" |
| "github.com/hashicorp/terraform-provider-google-beta/google-beta/acctest" |
| ) |
| |
| func TestAccLookerInstance_update(t *testing.T) { |
| t.Parallel() |
| |
| context := map[string]interface{}{ |
| "random_suffix": acctest.RandString(t, 10), |
| } |
| |
| acctest.VcrTest(t, resource.TestCase{ |
| PreCheck: func() { acctest.AccTestPreCheck(t) }, |
| ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), |
| CheckDestroy: testAccCheckLookerInstanceDestroyProducer(t), |
| Steps: []resource.TestStep{ |
| { |
| Config: testAccLookerInstance_lookerInstanceBasicExample(context), |
| }, |
| { |
| ResourceName: "google_looker_instance.looker-instance", |
| ImportState: true, |
| ImportStateVerify: true, |
| ImportStateVerifyIgnore: []string{"oauth_config", "region"}, |
| }, |
| { |
| Config: testAccLookerInstance_lookerInstanceFullExample(context), |
| }, |
| { |
| ResourceName: "google_looker_instance.looker-instance", |
| ImportState: true, |
| ImportStateVerify: true, |
| ImportStateVerifyIgnore: []string{"oauth_config", "region"}, |
| }, |
| }, |
| }) |
| } |