Skip to content

Commit 9c5b07b

Browse files
committed
tests: rename domain
1 parent cadc966 commit 9c5b07b

File tree

4 files changed

+76
-75
lines changed

4 files changed

+76
-75
lines changed

tests/integration/targets/cs_domain/aliases

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cloud/cs
2+
cs/group1
3+
cs/group3
Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- name: setup
3-
cs_domain:
3+
ngine_io.cloudstack.domain:
44
path: "{{ cs_resource_prefix }}_domain"
55
state: absent
66
register: dom
77
- name: verify setup
88
assert:
99
that:
10-
- dom is successful
10+
- dom is successful
1111

1212
- name: test fail if missing name
1313
action: cs_domain
@@ -16,194 +16,194 @@
1616
- name: verify results of fail if missing params
1717
assert:
1818
that:
19-
- dom is failed
20-
- 'dom.msg == "missing required arguments: path"'
19+
- dom is failed
20+
- 'dom.msg == "missing required arguments: path"'
2121

2222
- name: test fail if ends with /
23-
cs_domain:
23+
ngine_io.cloudstack.domain:
2424
path: "{{ cs_resource_prefix }}_domain/"
2525
register: dom
2626
ignore_errors: true
2727
- name: verify results of fail if ends with /
2828
assert:
2929
that:
30-
- dom is failed
31-
- dom.msg == "Path '{{ cs_resource_prefix }}_domain/' must not end with /"
30+
- dom is failed
31+
- dom.msg == "Path '" + cs_resource_prefix + "_domain/' must not end with /"
3232

3333
- name: test create a domain in check mode
34-
cs_domain:
34+
ngine_io.cloudstack.domain:
3535
path: "{{ cs_resource_prefix }}_domain"
3636
register: dom
3737
check_mode: true
3838
- name: verify results of test create a domain in check mode
3939
assert:
4040
that:
41-
- dom is changed
41+
- dom is changed
4242

4343
- name: test create a domain
44-
cs_domain:
44+
ngine_io.cloudstack.domain:
4545
path: "{{ cs_resource_prefix }}_domain"
4646
register: dom
4747
- name: verify results of test create a domain
4848
assert:
4949
that:
50-
- dom is changed
51-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
52-
- dom.name == "{{ cs_resource_prefix }}_domain"
50+
- dom is changed
51+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain"
52+
- dom.name == cs_resource_prefix + "_domain"
5353

5454
- name: test create a domain idempotence
55-
cs_domain:
55+
ngine_io.cloudstack.domain:
5656
path: "{{ cs_resource_prefix }}_domain"
5757
register: dom
5858
- name: verify results of test create a domain idempotence
5959
assert:
6060
that:
61-
- dom is not changed
62-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
63-
- dom.name == "{{ cs_resource_prefix }}_domain"
61+
- dom is not changed
62+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain"
63+
- dom.name == cs_resource_prefix + "_domain"
6464

6565
- name: test create a domain idempotence2
66-
cs_domain:
66+
ngine_io.cloudstack.domain:
6767
path: "/{{ cs_resource_prefix }}_domain"
6868
register: dom
6969
- name: verify results of test create a domain idempotence2
7070
assert:
7171
that:
72-
- dom is not changed
73-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
74-
- dom.name == "{{ cs_resource_prefix }}_domain"
72+
- dom is not changed
73+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain"
74+
- dom.name == cs_resource_prefix + "_domain"
7575

7676
- name: test fail to create a subdomain for inexistent domain
77-
cs_domain:
77+
ngine_io.cloudstack.domain:
7878
path: ROOT/inexistent/{{ cs_resource_prefix }}_subdomain
7979
register: dom
8080
ignore_errors: true
8181
- name: test fail to create a subdomain for inexistent domain
8282
assert:
8383
that:
84-
- dom is failed
85-
- dom.msg == "Parent domain path ROOT/inexistent does not exist"
84+
- dom is failed
85+
- dom.msg == "Parent domain path ROOT/inexistent does not exist"
8686

8787
- name: test create a subdomain in check mode
88-
cs_domain:
88+
ngine_io.cloudstack.domain:
8989
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
9090
register: dom
9191
check_mode: true
9292
- name: verify results of test create a domain in check mode
9393
assert:
9494
that:
95-
- dom is changed
95+
- dom is changed
9696

9797
- name: test create a subdomain
98-
cs_domain:
98+
ngine_io.cloudstack.domain:
9999
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
100100
register: dom
101101
- name: verify results of test create a domain
102102
assert:
103103
that:
104-
- dom is changed
105-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
106-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
104+
- dom is changed
105+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
106+
- dom.name == cs_resource_prefix + "_subdomain"
107107

108108
- name: test create a subdomain idempotence
109-
cs_domain:
109+
ngine_io.cloudstack.domain:
110110
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
111111
register: dom
112112
- name: verify results of test create a subdomain idempotence
113113
assert:
114114
that:
115-
- dom is not changed
116-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
117-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
115+
- dom is not changed
116+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
117+
- dom.name == cs_resource_prefix + "_subdomain"
118118

119119
- name: test update a subdomain in check mode
120-
cs_domain:
120+
ngine_io.cloudstack.domain:
121121
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
122122
network_domain: domain.example.com
123123
register: dom
124124
check_mode: true
125125
- name: verify results of test update a subdomain in check mode
126126
assert:
127127
that:
128-
- dom is changed
129-
- dom.network_domain is undefined
130-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
131-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
128+
- dom is changed
129+
- dom.network_domain is undefined
130+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
131+
- dom.name == cs_resource_prefix + "_subdomain"
132132

133133
- name: test update a subdomain
134-
cs_domain:
134+
ngine_io.cloudstack.domain:
135135
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
136136
network_domain: domain.example.com
137137
register: dom
138138
- name: verify results of test update a subdomain
139139
assert:
140140
that:
141-
- dom is changed
142-
- dom.network_domain == "domain.example.com"
143-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
144-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
141+
- dom is changed
142+
- dom.network_domain == "domain.example.com"
143+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
144+
- dom.name == cs_resource_prefix + "_subdomain"
145145

146146
- name: test update a subdomain idempotence
147-
cs_domain:
147+
ngine_io.cloudstack.domain:
148148
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
149149
network_domain: domain.example.com
150150
register: dom
151151
- name: verify results of test update a subdomain idempotence
152152
assert:
153153
that:
154-
- dom is not changed
155-
- dom.network_domain == "domain.example.com"
156-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
157-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
154+
- dom is not changed
155+
- dom.network_domain == "domain.example.com"
156+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
157+
- dom.name == cs_resource_prefix + "_subdomain"
158158

159159
- name: test delete a subdomain in check mode
160-
cs_domain:
160+
ngine_io.cloudstack.domain:
161161
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
162162
state: absent
163163
register: dom
164164
check_mode: true
165165
- name: verify results of test delete a subdomain in check mode
166166
assert:
167167
that:
168-
- dom is changed
169-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
170-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
168+
- dom is changed
169+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
170+
- dom.name == cs_resource_prefix + "_subdomain"
171171

172172
- name: test delete a subdomain
173-
cs_domain:
173+
ngine_io.cloudstack.domain:
174174
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
175175
state: absent
176176
register: dom
177177
- name: verify results of test delete a subdomain
178178
assert:
179179
that:
180-
- dom is changed
181-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
182-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
180+
- dom is changed
181+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
182+
- dom.name == cs_resource_prefix + "_subdomain"
183183

184184
- name: test delete a subdomain idempotence
185-
cs_domain:
185+
ngine_io.cloudstack.domain:
186186
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
187187
state: absent
188188
register: dom
189189
- name: verify results of test delete a subdomain idempotence
190190
assert:
191191
that:
192-
- dom is not changed
192+
- dom is not changed
193193

194194
- name: test create a subdomain 2
195-
cs_domain:
195+
ngine_io.cloudstack.domain:
196196
path: ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain
197197
register: dom
198198
- name: verify results of test create a subdomain 2
199199
assert:
200200
that:
201-
- dom is changed
202-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain/{{ cs_resource_prefix }}_subdomain"
203-
- dom.name == "{{ cs_resource_prefix }}_subdomain"
201+
- dom is changed
202+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain/" + cs_resource_prefix + "_subdomain"
203+
- dom.name == cs_resource_prefix + "_subdomain"
204204

205205
- name: test delete a domain with clean up in check mode
206-
cs_domain:
206+
ngine_io.cloudstack.domain:
207207
path: ROOT/{{ cs_resource_prefix }}_domain
208208
state: absent
209209
clean_up: true
@@ -212,30 +212,30 @@
212212
- name: verify results of test delete a domain with clean up in check mode
213213
assert:
214214
that:
215-
- dom is changed
216-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
217-
- dom.name == "{{ cs_resource_prefix }}_domain"
215+
- dom is changed
216+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain"
217+
- dom.name == cs_resource_prefix + "_domain"
218218

219219
- name: test delete a domain with clean up
220-
cs_domain:
220+
ngine_io.cloudstack.domain:
221221
path: ROOT/{{ cs_resource_prefix }}_domain
222222
state: absent
223223
clean_up: true
224224
register: dom
225225
- name: verify results of test delete a domain with clean up
226226
assert:
227227
that:
228-
- dom is changed
229-
- dom.path == "ROOT/{{ cs_resource_prefix }}_domain"
230-
- dom.name == "{{ cs_resource_prefix }}_domain"
228+
- dom is changed
229+
- dom.path == "ROOT/" + cs_resource_prefix + "_domain"
230+
- dom.name == "{{ cs_resource_prefix }}_domain"
231231

232232
- name: test delete a domain with clean up idempotence
233-
cs_domain:
233+
ngine_io.cloudstack.domain:
234234
path: ROOT/{{ cs_resource_prefix }}_domain
235235
state: absent
236236
clean_up: true
237237
register: dom
238238
- name: verify results of test delete a domain with clean up idempotence
239239
assert:
240240
that:
241-
- dom is not changed
241+
- dom is not changed

0 commit comments

Comments
 (0)