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

support iec flavors data source and docs #779

Merged
merged 3 commits into from
Dec 26, 2020
Merged

support iec flavors data source and docs #779

merged 3 commits into from
Dec 26, 2020

Conversation

Lance52259
Copy link
Contributor

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run=TestAccIECFlavorsDataSource_basic -timeout 360m -parallel 4
=== RUN TestAccIECFlavorsDataSource_basic
=== PAUSE TestAccIECFlavorsDataSource_basic
=== CONT TestAccIECFlavorsDataSource_basic
--- PASS: TestAccIECFlavorsDataSource_basic (14.13s)
PASS
ok github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud 14.177s

Check: resource.ComposeTestCheckFunc(
testAccCheckIECFlavorsDataSourceID(resourceName, rName),
resource.TestMatchResourceAttr(resourceName, "flavors.#", regexp.MustCompile("[1-9]\\d*")),
resource.TestCheckResourceAttr(resourceName, "region", "cn-north-4"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use the "HW_REGION_NAME" env instead of a specified region

})
}

func testAccCheckIECFlavorsDataSourceID(n, rName string) resource.TestCheckFunc {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the param rName is not used

Change list: 
1. Remove useless function parameter rName.
2. Remove flavors name in config and remove parameter check.
3. Use HW_REGION_NAME to instead old type.
@ShiChangkuo ShiChangkuo merged commit cc036e6 into huaweicloud:master Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants