Skip to content

Commit

Permalink
Add PreApply to RepositoryGroup and CodeRepositoryIndex update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JumiDeluxe committed Nov 13, 2024
1 parent 40bc461 commit c5b0adb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mmv1/products/cloudaicompanion/RepositoryGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ examples:
- name: "gemini_repository_group_basic"
min_version: 'beta'
primary_resource_id: "example"
primary_resource_name: '"cri-1", fmt.Sprintf("tf-test-my-repo-group%s", context["random_suffix"])'
primary_resource_name: 'acctest.BootstrapSharedCodeRepositoryIndex(t, "basic-rg-test", "us-central1", "", ""), "test-rg-repository-group-id"'
vars:
repository_group_id: "example-repository-group-id"
git_repository_link_id: 'example-git-repository-link-id'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/plancheck"

"github.com/hashicorp/terraform-provider-google/google/acctest"
)
Expand All @@ -31,6 +32,11 @@ func TestAccGeminiCodeRepositoryIndex_update(t *testing.T) {
},
{
Config: testAccGeminiCodeRepositoryIndex_update(context),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("google_gemini_code_repository_index.example", plancheck.ResourceActionUpdate),
},
},
},
{
ResourceName: "google_gemini_code_repository_index.example",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func TestAccGeminiRepositoryGroup_update(t *testing.T) {
},
{
Config: testAccGeminiRepositoryGroup_update(context),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("google_gemini_repository_group.example", plancheck.ResourceActionUpdate),
},
},
},
{
ResourceName: "google_gemini_repository_group.example",
Expand Down

0 comments on commit c5b0adb

Please sign in to comment.