From df9c793ecfc7b298d3ea4eb8ae586bd8f7a422f4 Mon Sep 17 00:00:00 2001 From: Dainius S Date: Mon, 9 Mar 2020 08:04:51 +0200 Subject: [PATCH 1/2] Skip TestAccDataSourceNotFound/vcd_external_network test with org user --- vcd/datasource_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vcd/datasource_test.go b/vcd/datasource_test.go index d16f9ca41..f6e070a8f 100644 --- a/vcd/datasource_test.go +++ b/vcd/datasource_test.go @@ -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) From 4619e43ce1ae8204d9743a7ae66951e9c795ddf6 Mon Sep 17 00:00:00 2001 From: Dainius S Date: Mon, 9 Mar 2020 08:09:59 +0200 Subject: [PATCH 2/2] [skip ci] add PR# to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39a1b645d..a886baa85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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