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

add data_source_huaweicloud_gaussdb_mysql_instances #855

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

Jason-Zhang9309
Copy link
Collaborator

fixes #853
Test result:

make testacc TEST='./huaweicloud' TESTARGS='-run TestAccGaussdbMysqlInstancesDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run TestAccGaussdbMysqlInstancesDataSource_basic -timeout 360m -parallel 4
=== RUN   TestAccGaussdbMysqlInstancesDataSource_basic
=== PAUSE TestAccGaussdbMysqlInstancesDataSource_basic
=== CONT  TestAccGaussdbMysqlInstancesDataSource_basic
--- PASS: TestAccGaussdbMysqlInstancesDataSource_basic (730.98s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       731.020s

}
}

func testAccCheckGaussdbMysqlInstancesDataLen(n 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.

seems this function is never called.

BTW, this check funcction is not recommended, you can try resource.TestCheckResourceAttr("data.huaweicloud_gaussdb_mysql_instances.test", "instances.#", "1"),

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new test result:

make testacc TEST='./huaweicloud' TESTARGS='-run TestAccGaussdbMysqlInstancesDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run TestAccGaussdbMysqlInstancesDataSource_basic -timeout 360m -parallel 4
=== RUN   TestAccGaussdbMysqlInstancesDataSource_basic
=== PAUSE TestAccGaussdbMysqlInstancesDataSource_basic
=== CONT  TestAccGaussdbMysqlInstancesDataSource_basic
--- PASS: TestAccGaussdbMysqlInstancesDataSource_basic (813.94s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       813.983s

@Jason-Zhang9309
Copy link
Collaborator Author

use getting detail only in necessary parts, make the code logic clearer

new test result:

make testacc TEST='./huaweicloud' TESTARGS='-run TestAccGaussdbMysqlInstancesDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run TestAccGaussdbMysqlInstancesDataSource_basic -timeout 360m -parallel 4
=== RUN   TestAccGaussdbMysqlInstancesDataSource_basic
=== PAUSE TestAccGaussdbMysqlInstancesDataSource_basic
=== CONT  TestAccGaussdbMysqlInstancesDataSource_basic
--- PASS: TestAccGaussdbMysqlInstancesDataSource_basic (797.28s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       797.328s

@ShiChangkuo ShiChangkuo merged commit 48e9080 into huaweicloud:master Jan 26, 2021
@Jason-Zhang9309 Jason-Zhang9309 deleted the dev-gaussdb branch January 26, 2021 06:45
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.

[Feature Request] data sources to get all available gaussdb mysql instances
2 participants