diff --git a/GNUmakefile b/GNUmakefile index 2598c4fd7..a10044514 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -139,6 +139,10 @@ testextnetwork: fmtcheck # Runs the acceptance test for tm testtm: fmtcheck @sh -c "'$(CURDIR)/scripts/runtest.sh' tm" +# Runs the acceptance test for tm with coverage +testtm-coverage: fmtcheck + @sh -c "'$(CURDIR)/scripts/runtest.sh' tm-coverage" + testtm-binary-prepare: install cd vcd && go test -tags tm -vcd-add-provider -vcd-short -v . diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 7a7ca197c..2218a311e 100755 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -406,6 +406,9 @@ case $wanted in tm) acceptance_test tm ;; + tm-coverage) + acceptance_test tm "-coverprofile=tm.cover" + ;; network) acceptance_test network ;; diff --git a/vcd/resource_vcd_tm_org.go b/vcd/resource_vcd_tm_org.go index 78850e58c..8200e1d8e 100644 --- a/vcd/resource_vcd_tm_org.go +++ b/vcd/resource_vcd_tm_org.go @@ -184,7 +184,7 @@ func validateRenameOrgDisabled(d *schema.ResourceData, oldCfg *govcd.TmOrg, newC if d.HasChange("name") && // this condition is a negative xor - it will be matched if Org is not transitioning from or to disabled state ((!newCfg.IsEnabled && !oldCfg.TmOrg.IsEnabled) || newCfg.IsEnabled && oldCfg.TmOrg.IsEnabled) { - return fmt.Errorf("%s must be disabled (is_enabled=false) to change name", labelTmOrg) + return fmt.Errorf("%s must be disabled (is_enabled=false) to change name because it changes tenant login URL", labelTmOrg) } return nil diff --git a/website/docs/r/tm_org.html.markdown b/website/docs/r/tm_org.html.markdown index 260d0afd0..acdc0ae10 100644 --- a/website/docs/r/tm_org.html.markdown +++ b/website/docs/r/tm_org.html.markdown @@ -38,7 +38,8 @@ resource "vcd_tm_org" "test" { The following arguments are supported: * `name` - (Required) A name for Organization with which users log in to it as it will be used in - the URL + the URL. The Org must be disabled to or transition from previous disabled state + (`is_enabled=false`) to change a name. * `display_name` - (Required) A human readable name for Organization * `description` - (Optional) An optional description for Organization * `is_enabled` - (Optional) Defines if Organization is enabled. Default `true`. **Note:**