blob: 29732c5d7ae7de0eff8480639eeb42db7d604e57 [file] [log] [blame]
sg481nbd890c52017-08-28 12:11:35 -04001set XX@NS <pass>
2set testid@aaf.att.com <pass>
3set testunused@aaf.att.com <pass>
4set bogus@aaf.att.com boguspass
5#delay 10
6set NFR 0
7as testid@aaf.att.com
8# TC_NSdelete1.10.0.POS Check for Existing Data
9ns list name com.test.TC_NSdelete1.@[user.name].app
10** Expect 200 **
11
12List Namespaces by Name[com.test.TC_NSdelete1.@[THE_USER].app]
13--------------------------------------------------------------------------------
14 *** Namespace Not Found ***
15
16ns list name com.test.force.@[user.name]
17** Expect 200 **
18
19List Namespaces by Name[com.test.force.@[THE_USER]]
20--------------------------------------------------------------------------------
21 *** Namespace Not Found ***
22
23ns list name com.@[user.name]
24** Expect 200 **
25
26List Namespaces by Name[com.@[THE_USER]]
27--------------------------------------------------------------------------------
28 *** Namespace Not Found ***
29
30as XX@NS
31# TC_NSdelete1.10.1.POS Create Namespaces with valid IDs and Responsible Parties
32ns create com.test.TC_NSdelete1.@[user.name].app @[user.name] testid@aaf.att.com
33** Expect 201 **
34Created Namespace
35
36ns create com.@[user.name] @[user.name] testid@aaf.att.com
37** Expect 201 **
38Created Namespace
39
40ns create com.test.force.@[user.name] @[user.name] testid@aaf.att.com
41** Expect 201 **
42Created Namespace
43
44ns create com.test.TC_NSdelete1.@[user.name] @[user.name] testid@aaf.att.com
45** Expect 201 **
46Created Namespace
47
48# TC_NSdelete1.10.2.POS Expect Namespace to be created
49ns list name com.test.TC_NSdelete1.@[user.name].app
50** Expect 200 **
51
52List Namespaces by Name[com.test.TC_NSdelete1.@[THE_USER].app]
53--------------------------------------------------------------------------------
54com.test.TC_NSdelete1.@[THE_USER].app
55 Administrators
56 testid@aaf.att.com
57 Responsible Parties
58 @[THE_USER]@csp.att.com
59 Roles
60 com.test.TC_NSdelete1.@[THE_USER].app.admin
61 com.test.TC_NSdelete1.@[THE_USER].app.owner
62 Permissions
63 com.test.TC_NSdelete1.@[THE_USER].app.access * *
64 com.test.TC_NSdelete1.@[THE_USER].app.access * read
65
66ns list name com.test.TC_NSdelete1.@[user.name]
67** Expect 200 **
68
69List Namespaces by Name[com.test.TC_NSdelete1.@[THE_USER]]
70--------------------------------------------------------------------------------
71com.test.TC_NSdelete1.@[THE_USER]
72 Administrators
73 testid@aaf.att.com
74 Responsible Parties
75 @[THE_USER]@csp.att.com
76 Roles
77 com.test.TC_NSdelete1.@[THE_USER].admin
78 com.test.TC_NSdelete1.@[THE_USER].owner
79 Permissions
80 com.test.TC_NSdelete1.@[THE_USER].access * *
81 com.test.TC_NSdelete1.@[THE_USER].access * read
82
83ns list name com.@[user.name]
84** Expect 200 **
85
86List Namespaces by Name[com.@[THE_USER]]
87--------------------------------------------------------------------------------
88com.@[THE_USER]
89 Administrators
90 testid@aaf.att.com
91 Responsible Parties
92 @[THE_USER]@csp.att.com
93 Roles
94 com.@[THE_USER].admin
95 com.@[THE_USER].owner
96 Permissions
97 com.@[THE_USER].access * *
98 com.@[THE_USER].access * read
99
100ns list name com.test.force.@[user.name]
101** Expect 200 **
102
103List Namespaces by Name[com.test.force.@[THE_USER]]
104--------------------------------------------------------------------------------
105com.test.force.@[THE_USER]
106 Administrators
107 testid@aaf.att.com
108 Responsible Parties
109 @[THE_USER]@csp.att.com
110 Roles
111 com.test.force.@[THE_USER].admin
112 com.test.force.@[THE_USER].owner
113 Permissions
114 com.test.force.@[THE_USER].access * *
115 com.test.force.@[THE_USER].access * read
116
117# TC_NSdelete1.10.10.POS Create role to assign mechid perm to
118role create com.test.TC_NSdelete1.@[user.name].cred_admin
119** Expect 201 **
120Created Role
121
122# TC_NSdelete1.10.11.POS Assign role to mechid perm
123perm grant com.att.aaf.mechid com.att create com.test.TC_NSdelete1.@[user.name].cred_admin
124** Expect 201 **
125Granted Permission [com.att.aaf.mechid|com.att|create] to Role [com.test.TC_NSdelete1.@[THE_USER].cred_admin]
126
127as testid@aaf.att.com
128# TC_NSdelete1.10.12.POS Assign user for creating creds
129user role add testid@aaf.att.com com.test.TC_NSdelete1.@[user.name].cred_admin
130** Expect 201 **
131Added Role [com.test.TC_NSdelete1.@[THE_USER].cred_admin] to User [testid@aaf.att.com]
132
133as testid@aaf.att.com
134# TC_NSdelete1.20.1.POS Create valid Role in my Namespace
135role create com.test.TC_NSdelete1.@[user.name].app.r.A
136** Expect 201 **
137Created Role
138
139# TC_NSdelete1.20.2.POS Create valid permission
140perm create com.test.TC_NSdelete1.@[user.name].app.p.A myInstance myAction
141** Expect 201 **
142Created Permission
143
144# TC_NSdelete1.20.3.POS Add credential to my namespace
145user cred add m99990@app.@[user.name].TC_NSdelete1.test.com password123
146** Expect 201 **
147Added Credential [m99990@app.@[THE_USER].TC_NSdelete1.test.com]
148
149# TC_NSdelete1.20.10.NEG Delete Program Should fail because of attached credential
150ns delete com.test.TC_NSdelete1.@[user.name].app
151** Expect 424 **
152Failed [SVC1424]: Failed Dependency - [com.test.TC_NSdelete1.@[THE_USER].app] contains users, permissions, roles.
153 Delete dependencies and try again. Note: using force=true will delete all. force=move will delete Creds, but move Roles and Perms to parent.
154
155# TC_NSdelete1.20.11.POS Delete Credential
156set force true
157user cred del m99990@app.@[user.name].TC_NSdelete1.test.com
158** Expect 200 **
159Deleted Credential [m99990@app.@[THE_USER].TC_NSdelete1.test.com]
160
161# TC_NSdelete1.20.12.NEG Delete Program with role and permission attached
162ns delete com.test.TC_NSdelete1.@[user.name].app
163** Expect 424 **
164Failed [SVC1424]: Failed Dependency - [com.test.TC_NSdelete1.@[THE_USER].app] contains permissions, roles.
165 Delete dependencies and try again. Note: using force=true will delete all. force=move will delete Creds, but move Roles and Perms to parent.
166
167# TC_NSdelete1.20.20.POS Expect role and permission to move to parent ns
168set force move
169set force=move ns list name com.test.TC_NSdelete1.@[user.name]
170** Expect 200 **
171
172List Namespaces by Name[com.test.TC_NSdelete1.@[THE_USER]]
173--------------------------------------------------------------------------------
174com.test.TC_NSdelete1.@[THE_USER]
175 Administrators
176 testid@aaf.att.com
177 Responsible Parties
178 @[THE_USER]@csp.att.com
179 Roles
180 com.test.TC_NSdelete1.@[THE_USER].admin
181 com.test.TC_NSdelete1.@[THE_USER].cred_admin
182 com.test.TC_NSdelete1.@[THE_USER].owner
183 Permissions
184 com.test.TC_NSdelete1.@[THE_USER].access * *
185 com.test.TC_NSdelete1.@[THE_USER].access * read
186
187as testid@aaf.att.com
188# TC_NSdelete1.30.1.POS Create valid Role in my Namespace
189role create com.@[user.name].r.A
190** Expect 201 **
191Created Role
192
193# TC_NSdelete1.30.2.NEG Delete Company with role attached
194ns delete com.@[user.name]
195** Expect 424 **
196Failed [SVC1424]: Failed Dependency - [com.@[THE_USER]] contains roles.
197 Delete dependencies and try again. Note: using force=true will delete all. force=move will delete Creds, but move Roles and Perms to parent.
198
199# TC_NSdelete1.30.3.POS Namespace Admin can delete Namepace defined Roles
200role delete com.@[user.name].r.A
201** Expect 200 **
202Deleted Role
203
204# TC_NSdelete1.30.10.POS Create valid permission
205perm create com.@[user.name].p.A myInstance myAction
206** Expect 201 **
207Created Permission
208
209# TC_NSdelete1.30.11.NEG Delete Company with permission attached
210ns delete com.@[user.name]
211** Expect 424 **
212Failed [SVC1424]: Failed Dependency - [com.@[THE_USER]] contains permissions.
213 Delete dependencies and try again. Note: using force=true will delete all. force=move will delete Creds, but move Roles and Perms to parent.
214
215# TC_NSdelete1.30.12.POS Namespace Admin can delete Namepace defined Perms
216perm delete com.@[user.name].p.A myInstance myAction
217** Expect 200 **
218Deleted Permission
219
220# TC_NSdelete1.30.20.POS Create valid Credential in my namespace
221user cred add m99990@@[user.name].com password123
222** Expect 201 **
223Added Credential [m99990@@[THE_USER].com]
224
225# TC_NSdelete1.30.21.NEG Delete Company with credential attached
226ns delete com.@[user.name]
227** Expect 424 **
228Failed [SVC1424]: Failed Dependency - [com.@[THE_USER]] contains users.
229 Delete dependencies and try again. Note: using force=true will delete all. force=move will delete Creds, but move Roles and Perms to parent.
230
231# TC_NSdelete1.30.22.POS Namespace admin can remove Cred
232set force true
233user cred del m99990@@[user.name].com
234** Expect 200 **
235Deleted Credential [m99990@@[THE_USER].com]
236
237# TC_NSdelete1.30.30.POS Delete Company with no roles or perms attached
238ns delete com.@[user.name]
239** Expect 200 **
240Deleted Namespace
241
242# TC_NSdelete1.40.1.POS Create valid Role in my Namespace
243role create com.test.force.@[user.name].r.A
244** Expect 201 **
245Created Role
246
247# TC_NSdelete1.40.2.POS Create valid permission in my Namespace
248perm create com.test.force.@[user.name].p.A myInstance myAction
249** Expect 201 **
250Created Permission
251
252# TC_NSdelete1.40.3.POS Add credential to my namespace
253user cred add m99990@@[user.name].force.test.com password123
254** Expect 201 **
255Added Credential [m99990@@[THE_USER].force.test.com]
256
257# TC_NSdelete1.40.10.POS Delete Program in my Namespace
258set force true
259set force=true ns delete com.test.force.@[user.name]
260** Expect 200 **
261Deleted Namespace
262
263sleep 0
264# TC_NSdelete1.40.20.NEG Role and permission should not exist
265ns list name com.test.force.@[user.name]
266** Expect 200,404 **
267
268List Namespaces by Name[com.test.force.@[THE_USER]]
269--------------------------------------------------------------------------------
270 *** Namespace Not Found ***
271
272# TC_NSdelete1.40.22.NEG Credential should not exist
273set force true
274user cred del m99990@@[user.name].force.test.com
275** Expect 404 **
276Failed [SVC5404]: Not Found - Credential does not exist
277
278as testid@aaf.att.com
279# TC_NSdelete1.99.1.POS Namespace Admin can delete Namepace defined Roles
280role delete com.test.TC_NSdelete1.@[user.name].app.r.A
281** Expect 200,404 **
282Deleted Role
283
284# TC_NSdelete1.99.2.POS Namespace Admin can delete Namepace defined Roles
285perm delete com.test.TC_NSdelete1.@[user.name].app.p.A myInstance myAction
286** Expect 200,404 **
287Deleted Permission
288
289# TC_NSdelete1.99.3.POS Namespace Admin can remove Namepace defined Credentials
290set force true
291set force=true user cred del m99990@@app.[user.name].TC_NSdelete1.test.com
292** Expect 200,404 **
293Failed [SVC5404]: Not Found - Credential does not exist
294
295# TC_NSdelete1.99.10.POS Remove ability to create creds
296user role del testid@aaf.att.com com.test.TC_NSdelete1.@[user.name].cred_admin
297** Expect 200,404 **
298Removed Role [com.test.TC_NSdelete1.@[THE_USER].cred_admin] from User [testid@aaf.att.com]
299
300as XX@NS
301perm ungrant com.att.aaf.mechid com.att create com.test.TC_NSdelete1.@[user.name].cred_admin
302** Expect 200,404 **
303UnGranted Permission [com.att.aaf.mechid|com.att|create] from Role [com.test.TC_NSdelete1.@[THE_USER].cred_admin]
304
305as testid@aaf.att.com
306set force true
307set force=true role delete com.test.TC_NSdelete1.@[user.name].cred_admin
308** Expect 200,404 **
309Deleted Role
310
311# TC_NSdelete1.99.97.POS Clean Namespace
312set force true
313set force=true ns delete com.test.TC_NSdelete1.@[user.name].app
314** Expect 200,404 **
315Deleted Namespace
316
317set force true
318set force=true ns delete com.test.TC_NSdelete1.@[user.name]
319** Expect 200,404 **
320Deleted Namespace
321
322set force true
323set force=true ns delete com.test.force.@[user.name]
324** Expect 200,404 **
325Failed [SVC2404]: Not Found - com.test.force.@[THE_USER] does not exist
326
327# TC_NSdelete1.99.98.POS Check Clean Namespace
328ns list name com.test.TC_NSdelete1.@[user.name].app
329** Expect 200,404 **
330
331List Namespaces by Name[com.test.TC_NSdelete1.@[THE_USER].app]
332--------------------------------------------------------------------------------
333 *** Namespace Not Found ***
334
335ns list name com.test.TC_NSdelete1.@[user.name]
336** Expect 200,404 **
337
338List Namespaces by Name[com.test.TC_NSdelete1.@[THE_USER]]
339--------------------------------------------------------------------------------
340 *** Namespace Not Found ***
341
342ns list name com.test.force.@[user.name]
343** Expect 200,404 **
344
345List Namespaces by Name[com.test.force.@[THE_USER]]
346--------------------------------------------------------------------------------
347 *** Namespace Not Found ***
348
349# TC_NSdelete1.99.99.POS Clean and check Company Namespace
350as XX@NS
351set force true
352set force=true ns delete com.@[user.name]
353** Expect 200,404 **
354Failed [SVC2404]: Not Found - com.@[THE_USER] does not exist
355
356ns list name com.@[user.name]
357** Expect 200,404 **
358
359List Namespaces by Name[com.@[THE_USER]]
360--------------------------------------------------------------------------------
361 *** Namespace Not Found ***
362