-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GOOGLE_VMWAREENGINE_PROJECT env var for vmwareengine tests (#12707)
- Loading branch information
Showing
15 changed files
with
96 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ type Examples struct { | |
// - :CUST_ID | ||
// - :IDENTITY_USER | ||
// - :CHRONICLE_ID | ||
// - :VMWAREENGINE_PROJECT | ||
// This list corresponds to the `get*FromEnv` methods in provider_test.go. | ||
TestEnvVars map[string]string `yaml:"test_env_vars,omitempty"` | ||
|
||
|
@@ -215,19 +216,20 @@ func (e *Examples) SetHCLText() { | |
originalTestEnvVars := e.TestEnvVars | ||
docTestEnvVars := make(map[string]string) | ||
docs_defaults := map[string]string{ | ||
"PROJECT_NAME": "my-project-name", | ||
"CREDENTIALS": "my/credentials/filename.json", | ||
"REGION": "us-west1", | ||
"ORG_ID": "123456789", | ||
"ORG_DOMAIN": "example.com", | ||
"ORG_TARGET": "123456789", | ||
"BILLING_ACCT": "000000-0000000-0000000-000000", | ||
"MASTER_BILLING_ACCT": "000000-0000000-0000000-000000", | ||
"SERVICE_ACCT": "[email protected]", | ||
"CUST_ID": "A01b123xz", | ||
"IDENTITY_USER": "cloud_identity_user", | ||
"PAP_DESCRIPTION": "description", | ||
"CHRONICLE_ID": "00000000-0000-0000-0000-000000000000", | ||
"PROJECT_NAME": "my-project-name", | ||
"CREDENTIALS": "my/credentials/filename.json", | ||
"REGION": "us-west1", | ||
"ORG_ID": "123456789", | ||
"ORG_DOMAIN": "example.com", | ||
"ORG_TARGET": "123456789", | ||
"BILLING_ACCT": "000000-0000000-0000000-000000", | ||
"MASTER_BILLING_ACCT": "000000-0000000-0000000-000000", | ||
"SERVICE_ACCT": "[email protected]", | ||
"CUST_ID": "A01b123xz", | ||
"IDENTITY_USER": "cloud_identity_user", | ||
"PAP_DESCRIPTION": "description", | ||
"CHRONICLE_ID": "00000000-0000-0000-0000-000000000000", | ||
"VMWAREENGINE_PROJECT": "my-vmwareengine-project", | ||
} | ||
|
||
// Apply doc defaults to test_env_vars from YAML | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,22 +119,23 @@ func (td *TemplateData) GenerateTestFile(filePath string, resource api.Resource) | |
templatePath, | ||
} | ||
tmplInput := TestInput{ | ||
Res: resource, | ||
ImportPath: td.ImportPath(), | ||
PROJECT_NAME: "my-project-name", | ||
CREDENTIALS: "my/credentials/filename.json", | ||
REGION: "us-west1", | ||
ORG_ID: "123456789", | ||
ORG_DOMAIN: "example.com", | ||
ORG_TARGET: "123456789", | ||
PROJECT_NUMBER: "1111111111111", | ||
BILLING_ACCT: "000000-0000000-0000000-000000", | ||
MASTER_BILLING_ACCT: "000000-0000000-0000000-000000", | ||
SERVICE_ACCT: "[email protected]", | ||
CUST_ID: "A01b123xz", | ||
IDENTITY_USER: "cloud_identity_user", | ||
PAP_DESCRIPTION: "description", | ||
CHRONICLE_ID: "00000000-0000-0000-0000-000000000000", | ||
Res: resource, | ||
ImportPath: td.ImportPath(), | ||
PROJECT_NAME: "my-project-name", | ||
CREDENTIALS: "my/credentials/filename.json", | ||
REGION: "us-west1", | ||
ORG_ID: "123456789", | ||
ORG_DOMAIN: "example.com", | ||
ORG_TARGET: "123456789", | ||
PROJECT_NUMBER: "1111111111111", | ||
BILLING_ACCT: "000000-0000000-0000000-000000", | ||
MASTER_BILLING_ACCT: "000000-0000000-0000000-000000", | ||
SERVICE_ACCT: "[email protected]", | ||
CUST_ID: "A01b123xz", | ||
IDENTITY_USER: "cloud_identity_user", | ||
PAP_DESCRIPTION: "description", | ||
CHRONICLE_ID: "00000000-0000-0000-0000-000000000000", | ||
VMWAREENGINE_PROJECT: "my-vmwareengine-project", | ||
} | ||
|
||
td.GenerateFile(filePath, templatePath, tmplInput, true, templates...) | ||
|
@@ -283,20 +284,21 @@ func FixImports(outputPath string, dumpDiffs bool) { | |
} | ||
|
||
type TestInput struct { | ||
Res api.Resource | ||
ImportPath string | ||
PROJECT_NAME string | ||
CREDENTIALS string | ||
REGION string | ||
ORG_ID string | ||
ORG_DOMAIN string | ||
ORG_TARGET string | ||
PROJECT_NUMBER string | ||
BILLING_ACCT string | ||
MASTER_BILLING_ACCT string | ||
SERVICE_ACCT string | ||
CUST_ID string | ||
IDENTITY_USER string | ||
PAP_DESCRIPTION string | ||
CHRONICLE_ID string | ||
Res api.Resource | ||
ImportPath string | ||
PROJECT_NAME string | ||
CREDENTIALS string | ||
REGION string | ||
ORG_ID string | ||
ORG_DOMAIN string | ||
ORG_TARGET string | ||
PROJECT_NUMBER string | ||
BILLING_ACCT string | ||
MASTER_BILLING_ACCT string | ||
SERVICE_ACCT string | ||
CUST_ID string | ||
IDENTITY_USER string | ||
PAP_DESCRIPTION string | ||
CHRONICLE_ID string | ||
VMWAREENGINE_PROJECT string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters