File tree 2 files changed +49
-1
lines changed
tests/integration/targets/role/tasks
2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ def main():
268
268
for resource in value :
269
269
# Attempt to look up project based on the provided name, ID, or named URL and lookup data
270
270
lookup_key = key
271
- if key == 'organizations' or key == 'users' :
271
+ if key == 'organizations' or key == 'users' or key == 'teams' :
272
272
lookup_data_populated = {}
273
273
else :
274
274
lookup_data_populated = lookup_data
Original file line number Diff line number Diff line change 13
13
wfjt_name : " AWX-Collection-tests-role-project-wfjt-{{ test_id }}"
14
14
team_name : " AWX-Collection-tests-team-team-{{ test_id }}"
15
15
team2_name : " AWX-Collection-tests-team-team-{{ test_id }}2"
16
+ org2_name : " AWX-Collection-tests-organization-{{ test_id }}2"
16
17
17
18
- block :
18
19
- name : Create a User
209
210
that :
210
211
- " result is changed"
211
212
213
+ - name : Create a 2nd organization
214
+ organization :
215
+ name : " {{ org2_name }}"
216
+
217
+ - name : Create a project in 2nd Organization
218
+ project :
219
+ name : " {{ project_name }}"
220
+ organization : " {{ org2_name }}"
221
+ scm_type : git
222
+ scm_url : https://github.com/ansible/test-playbooks
223
+ wait : true
224
+ register : project_info
225
+
226
+ - name : Add Joe and teams to the update role of the default Project with lookup from the 2nd Organization
227
+ role :
228
+ user : " {{ username }}"
229
+ users :
230
+ - " {{ username }}2"
231
+ teams :
232
+ - " {{ team_name }}"
233
+ - " {{ team2_name }}"
234
+ role : update
235
+ lookup_organization : " {{ org2_name }}"
236
+ project : " {{ project_name }}"
237
+ state : " {{ item }}"
238
+ register : result
239
+ with_items :
240
+ - " present"
241
+ - " absent"
242
+
243
+ - assert :
244
+ that :
245
+ - " result is changed"
246
+
212
247
always :
213
248
- name : Delete a User
214
249
user :
252
287
organization : Default
253
288
state : absent
254
289
register : result
290
+
291
+ - name : Delete the 2nd project
292
+ project :
293
+ name : " {{ project_name }}"
294
+ organization : " {{ org2_name }}"
295
+ state : absent
296
+ register : result
297
+
298
+ - name : Delete the 2nd organization
299
+ organization :
300
+ name : " {{ org2_name }}"
301
+ state : absent
302
+ register : result
You can’t perform that action at this time.
0 commit comments