Skip to content

Commit d352ad1

Browse files
Update provider for tgc tests (#15750) (#25222)
[upstream:a52bd6f726f2dbc8fb8b8e8a5960a9621b26fa11] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 2035371 commit d352ad1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

google/acctest/resource_inventory_reader.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99
// This code is generated by Magic Modules using the following:
1010
//
11-
// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/acctest/resource_inventory_reader.go
11+
// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/acctest/resource_inventory_reader.go.tmpl
1212
//
1313
// DO NOT EDIT this file directly. Any changes made to this file will be
1414
// overwritten during the next generation cycle.
@@ -52,6 +52,8 @@ var (
5252
"_iam_binding",
5353
"_iam_policy",
5454
}
55+
56+
providerName = "google"
5557
)
5658

5759
// PopulateMetadataCache walks through all metadata files once and populates
@@ -196,7 +198,7 @@ func getServicesDir() (string, error) {
196198
// Try to find project root
197199
root, err := findProjectRoot()
198200
if err == nil {
199-
servicesDir := filepath.Join(root, "google-beta", "services")
201+
servicesDir := filepath.Join(root, providerName, "services")
200202
if _, err := os.Stat(servicesDir); err == nil {
201203
return servicesDir, nil
202204
}
@@ -210,9 +212,9 @@ func getServicesDir() (string, error) {
210212

211213
// Try a few common relative paths
212214
potentialPaths := []string{
213-
filepath.Join(currentDir, "google-beta", "services"),
214-
filepath.Join(currentDir, "..", "google-beta", "services"),
215-
filepath.Join(currentDir, "..", "..", "google-beta", "services"),
215+
filepath.Join(currentDir, providerName, "services"),
216+
filepath.Join(currentDir, "..", providerName, "services"),
217+
filepath.Join(currentDir, "..", "..", providerName, "services"),
216218
}
217219

218220
for _, path := range potentialPaths {

0 commit comments

Comments
 (0)