Nios integration and unit tests for all remaining nios new modules (#43399)

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* test/integration/targets/nios_naptr_record/tasks/nios_naptr_record_idempotence.yml

new nios module integration test support

* fix pep8 error

* fix pep8 error

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end
This commit is contained in:
Sumit Jaiswal 2018-08-01 08:54:01 +05:30 committed by GitHub
parent 7314aa7298
commit e96f90b440
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 1414 additions and 8 deletions

View file

@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View file

@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View file

@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View file

@ -0,0 +1 @@
- include: nios_naptr_record_idempotence.yml

View file

@ -0,0 +1,91 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider: "{{ nios_provider }}"
- name: create an naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: present
provider: "{{ nios_provider }}"
register: naptr_record_create1
- name: recreate an naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: present
provider: "{{ nios_provider }}"
register: naptr_record_create2
- name: add a comment to an existing naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: naptr_record_update1
- name: add a comment to an existing naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: naptr_record_update2
- name: remove a naptr record from the system
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider: "{{ nios_provider }}"
register: naptr_record_delete1
- name: remove a naptr record from the system
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider: "{{ nios_provider }}"
register: naptr_record_delete2
- assert:
that:
- "naptr_record_create1.changed"
- "not naptr_record_create2.changed"
- "naptr_record_update1.changed"
- "not naptr_record_update2.changed"
- "naptr_record_delete1.changed"
- "not naptr_record_delete2.changed"