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

Skip TestAccDataSourceNotFound/vcd_external_network test with org user #470

Merged
merged 2 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IMPROVEMENTS:
definition to specify NIC type - [GH-441]
* `resource/vcd_vapp_vm` and `datasource/vcd_vapp_vm` `customization` block supports all available
features [GH-462, GH-469]
* `datasource/*` - all data sources return an error when object is not found [GH-446]
* `datasource/*` - all data sources return an error when object is not found [GH-446, GH-470]

DEPRECATIONS:
* `resource/vcd_vapp_vm` `network.name` deprecates automatic attachment of vApp Org network when
Expand Down
6 changes: 6 additions & 0 deletions vcd/datasource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ func TestAccDataSourceNotFound(t *testing.T) {

func testSpecificDataSourceNotFound(t *testing.T, dataSourceName string) func(*testing.T) {
return func(t *testing.T) {

// Skip sub-test if conditions are not met
if dataSourceName == "vcd_external_network" && !usingSysAdmin() {
t.Skip(`Works only with system admin privileges`)
}

// Get list of mandatory fields in schema for a particular data source
mandatoryFields := getMandatoryDataSourceSchemaFields(dataSourceName)
mandatoryRuntimeFields := getMandatoryDataSourceRuntimeFields(dataSourceName)
Expand Down