terraform-provider-nutanix icon indicating copy to clipboard operation
terraform-provider-nutanix copied to clipboard

Optimize testcases by integrating datasource and resource tests for same entity

Open bhati-pradeep opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently we have seperate files for resource as well as data source. For examples in subnet related resource and data sources tests, we create subnet subnets multiple times for each component. We can test all integrate few cases which are enough to test them. Also by this we can reduce test timing and redundancy.

Describe the solution you'd like Create integration tests combining resource and data sources for same entitiy. This would lead in creating resource only once for testing each resource and data source usecase.

bhati-pradeep avatar May 06 '22 06:05 bhati-pradeep

Running tests in parallel: Identify the usage of external resources like roles, users, subnets, etc. which are used as test inputs. Optimize the tests by making tests independent from this dependency (usage of 1 resource in multiple tests) so that tests can be run parallely.

bhati-pradeep avatar May 06 '22 11:05 bhati-pradeep