diff options
author | Dag Wieers <dag@wieers.com> | 2018-02-03 00:41:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-03 00:41:56 +0100 |
commit | bee765fa6b065b7a85a73057415cb3264592c2e4 (patch) | |
tree | 701a2c858790c4344de1563f0bb49c7800dde8cc /test/integration/targets/aci_ap | |
parent | 685dd5e8b4f0462571e2a8eabf367da694935178 (diff) | |
download | ansible-bee765fa6b065b7a85a73057415cb3264592c2e4.tar.gz |
ACI: Change RETURN output as discussed (#35617)
* ACI: Change result output as discussed
* Update all modules to use new aci.exit_json()
* Update output_level spec and docs
* Fix integration tests
* Small PEP8 fix
* Asorted fixes to tests and aci_rest
* More test fixes and support for ANSIBLE_DEBUG
* Fix another PEP8 issues
* Move response handling inside ACI module
* Reform of ACI error handling and error output
* Diff multiline json output
* Fix a few more tests
* Revert aci_bd tests
* Small correction
* UI change: existing->current, original->previous
* UI change: config->sent
* Update all modules with RETURN values
* Fix a few more tests
* Improve docstring and add 'raw' return value
* Fix thinko
* Fix sanity/pep8 issues
* Rewrite unit tests to comply with new design
Diffstat (limited to 'test/integration/targets/aci_ap')
-rw-r--r-- | test/integration/targets/aci_ap/tasks/main.yml | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/test/integration/targets/aci_ap/tasks/main.yml b/test/integration/targets/aci_ap/tasks/main.yml index afad4c556c..75b75d4574 100644 --- a/test/integration/targets/aci_ap/tasks/main.yml +++ b/test/integration/targets/aci_ap/tasks/main.yml @@ -16,6 +16,7 @@ validate_certs: '{{ aci_validate_certs | default(false) }}' use_ssl: '{{ aci_use_ssl | default(true) }}' use_proxy: '{{ aci_use_proxy | default(true) }}' + output_level: debug state: present tenant: anstest register: tenant_present @@ -60,14 +61,14 @@ that: - ap_present_check_mode.changed == true - ap_present.changed == true - - ap_present.existing == [] - - ap_present.config == ap_present_check_mode.config - - 'ap_present.config == {"fvAp": {"attributes": {"descr": "Ansible Test", "name": "anstest"}}}' + - ap_present.previous == [] + - ap_present.sent == ap_present_check_mode.sent + - 'ap_present.sent == {"fvAp": {"attributes": {"descr": "Ansible Test", "name": "anstest"}}}' - ap_present_idempotent.changed == false - - ap_present_idempotent.existing != [] - - ap_present_idempotent.config == {} + - ap_present_idempotent.previous != [] + - ap_present_idempotent.sent == {} - ap_present_update.changed == true - - 'ap_present_update.config.fvAp.attributes == {"descr": "Ansible Test Update"}' + - 'ap_present_update.sent.fvAp.attributes == {"descr": "Ansible Test Update"}' - ap_present_missing_param.failed == true - 'ap_present_missing_param.msg == "state is present but all of the following are missing: ap"' @@ -100,21 +101,21 @@ assert: that: - query_ap.changed == false - - query_ap.existing | length == 1 - - 'query_ap.existing.0.fvAp.attributes.name == "anstest"' + - query_ap.previous | length == 1 + - 'query_ap.previous.0.fvAp.attributes.name == "anstest"' - '"tn-anstest/ap-anstest.json" in query_ap.url' - query_ap_tenant.changed == false - - query_ap_tenant.existing | length == 1 - - query_ap_tenant.existing.0.fvTenant.children | length == 2 + - query_ap_tenant.previous | length == 1 + - query_ap_tenant.previous.0.fvTenant.children | length == 2 - '"rsp-subtree-class=fvAp" in query_ap_tenant.filter_string' - '"tn-anstest.json" in query_ap_tenant.url' - query_ap_ap.changed == false - - query_ap_ap.existing != [] - - query_ap_ap.existing.0.fvAp is defined + - query_ap_ap.previous != [] + - query_ap_ap.previous.0.fvAp is defined - '"query-target-filter=eq(fvAp.name, \"anstest\")" in query_ap_ap.filter_string' - '"class/fvAp.json" in query_ap_ap.url' - query_all.changed == false - - query_all.existing | length > 1 + - query_all.previous | length > 1 - '"class/fvAp.json" in query_all.url' - name: delete ap - check_mode works @@ -150,12 +151,12 @@ assert: that: - ap_delete_check_mode.changed == true - - ap_delete_check_mode.existing != [] + - ap_delete_check_mode.previous != [] - '"tn-anstest/ap-anstest.json" in ap_delete_check_mode.url' - ap_delete.changed == true - - ap_delete.existing == ap_delete_check_mode.existing + - ap_delete.previous == ap_delete_check_mode.previous - ap_delete_idempotent.changed == false - - ap_delete_idempotent.existing == [] + - ap_delete_idempotent.previous == [] - ap_delete_missing_param.failed == true - 'ap_delete_missing_param.msg == "state is absent but all of the following are missing: tenant"' |