2019-05-01 18:09:29 +00:00
@setupApplicationTest
Feature : dc / acls / policies / as many / add new: Add new policy
Background :
Given 1 d a t a c e n t e r m o d e l w i t h t h e v a l u e " d a t a c e n t e r "
And 1 [ M o d e l ] m o d e l f r o m y a m l
- - -
P o l i c i e s : ~
S e r v i c e I d e n t i t i e s : ~
- - -
When I v i s i t t h e [ M o d e l ] p a g e f o r y a m l
- - -
d c : d a t a c e n t e r
[ M o d e l ] : k e y
- - -
Then t h e u r l s h o u l d b e / d a t a c e n t e r / a c l s / [ M o d e l ] s / k e y
And I c l i c k p o l i c i e s . c r e a t e
Scenario : Adding a new policy as a child of [Model]
Then I f i l l i n t h e p o l i c i e s . f o r m w i t h y a m l
- - -
N a m e : N e w - P o l i c y
D e s c r i p t i o n : N e w P o l i c y D e s c r i p t i o n
R u l e s : k e y { }
- - -
And I c l i c k s u b m i t o n t h e p o l i c i e s . f o r m
2020-01-24 12:26:28 +00:00
Then a P U T r e q u e s t w a s m a d e t o " / v 1 / a c l / p o l i c y ? d c = d a t a c e n t e r " f r o m y a m l
2019-05-01 18:09:29 +00:00
- - -
2020-01-24 12:26:28 +00:00
b o d y :
N a m e : N e w - P o l i c y
D e s c r i p t i o n : N e w P o l i c y D e s c r i p t i o n
N a m e s p a c e : @namespace
R u l e s : k e y { }
2019-05-01 18:09:29 +00:00
- - -
And I s u b m i t
2020-01-24 12:26:28 +00:00
Then a P U T r e q u e s t w a s m a d e t o " / v 1 / a c l / [ M o d e l ] / k e y ? d c = d a t a c e n t e r " f r o m y a m l
2019-05-01 18:09:29 +00:00
- - -
2020-01-24 12:26:28 +00:00
b o d y :
N a m e s p a c e : @namespace
P o l i c i e s :
- I D : e e 52203 d - 989 f - 4 f 7 a - a b 5 a - 2 b e f 004164 c a - 1
N a m e : N e w - P o l i c y
2019-05-01 18:09:29 +00:00
- - -
Then t h e u r l s h o u l d b e / d a t a c e n t e r / a c l s / [ M o d e l ] s
And " [ d a t a - n o t i f i c a t i o n ] " h a s t h e " n o t i f i c a t i o n - u p d a t e " c l a s s
And " [ d a t a - n o t i f i c a t i o n ] " h a s t h e " s u c c e s s " c l a s s
W h e r e :
- - - - - - - - - - - - -
| M o d e l |
| t o k e n |
| r o l e |
- - - - - - - - - - - - -
Scenario : Adding a new service identity as a child of [Model]
Then I f i l l i n t h e p o l i c i e s . f o r m w i t h y a m l
- - -
N a m e : N e w - S e r v i c e - I d e n t i t y
D e s c r i p t i o n : N e w S e r v i c e I d e n t i t y D e s c r i p t i o n
- - -
And I c l i c k s e r v i c e I d e n t i t y o n t h e p o l i c i e s . f o r m
And I c l i c k s u b m i t o n t h e p o l i c i e s . f o r m
And I s u b m i t
2020-01-24 12:26:28 +00:00
Then a P U T r e q u e s t w a s m a d e t o " / v 1 / a c l / [ M o d e l ] / k e y ? d c = d a t a c e n t e r " f r o m y a m l
2019-05-01 18:09:29 +00:00
- - -
2020-01-24 12:26:28 +00:00
b o d y :
N a m e s p a c e : @namespace
S e r v i c e I d e n t i t i e s :
- S e r v i c e N a m e : N e w - S e r v i c e - I d e n t i t y
2019-05-01 18:09:29 +00:00
- - -
Then t h e u r l s h o u l d b e / d a t a c e n t e r / a c l s / [ M o d e l ] s
And " [ d a t a - n o t i f i c a t i o n ] " h a s t h e " n o t i f i c a t i o n - u p d a t e " c l a s s
And " [ d a t a - n o t i f i c a t i o n ] " h a s t h e " s u c c e s s " c l a s s
W h e r e :
- - - - - - - - - - - - -
| M o d e l |
| t o k e n |
| r o l e |
- - - - - - - - - - - - -
2019-06-04 14:53:10 +00:00
Scenario : Adding a new policy as a child of [Model] and getting an error
Given t h e u r l " / v 1 / a c l / p o l i c y " r e s p o n d s w i t h f r o m y a m l
- - -
s t a t u s : 500
b o d y : |
I n v a l i d s e r v i c e p o l i c y : a c l . S e r v i c e P o l i c y { N a m e : " s e r v i c e " , P o l i c y : " " , S e n t i n e l : a c l . S e n t i n e l { C o d e : " " , E n f o r c e m e n t L e v e l : " " } , I n t e n t i o n s : " " }
- - -
Then I f i l l i n t h e p o l i c i e s . f o r m w i t h y a m l
- - -
N a m e : N e w - P o l i c y
D e s c r i p t i o n : N e w P o l i c y D e s c r i p t i o n
R u l e s : k e y { }
- - -
And I c l i c k s u b m i t o n t h e p o l i c i e s . f o r m
2020-01-24 12:26:28 +00:00
Then a P U T r e q u e s t w a s m a d e t o " / v 1 / a c l / p o l i c y ? d c = d a t a c e n t e r " w i t h t h e b o d y f r o m y a m l
2019-06-04 14:53:10 +00:00
- - -
N a m e : N e w - P o l i c y
D e s c r i p t i o n : N e w P o l i c y D e s c r i p t i o n
2020-01-24 12:26:28 +00:00
N a m e s p a c e : @namespace
2019-06-04 14:53:10 +00:00
R u l e s : k e y { }
- - -
And I s e e e r r o r o n t h e p o l i c i e s . f o r m . r u l e s l i k e ' I n v a l i d s e r v i c e p o l i c y : a c l . S e r v i c e P o l i c y { N a m e : " s e r v i c e " , P o l i c y : " " , S e n t i n e l : a c l . S e n t i n e l { C o d e : " " , E n f o r c e m e n t L e v e l : " " } , I n t e n t i o n s : " " } '
W h e r e :
- - - - - - - - - - - - -
| M o d e l |
| t o k e n |
| r o l e |
- - - - - - - - - - - - -
2019-06-04 16:55:10 +00:00
Scenario : Try to edit the Service Identity using the code editor
And I c l i c k s e r v i c e I d e n t i t y o n t h e p o l i c i e s . f o r m
Then I c a n ' t f i l l i n t h e p o l i c i e s . f o r m w i t h y a m l
- - -
R u l e s : k e y { }
- - -
2019-05-01 18:09:29 +00:00
W h e r e :
- - - - - - - - - - - - -
| M o d e l |
| t o k e n |
| r o l e |
- - - - - - - - - - - - -