blob: 84090564e7804fe045198d9d2f1b7197d4518289 [file] [log] [blame]
Tommy Carpenter5ad8f032019-05-30 14:33:21 -04001# test_a1.tavern.yaml
2
3---
4
5test_name: test delayed policy
6
7stages:
8 - name: test the delayed policy
9 request:
10 url: http://localhost:10000/ric/policies/test_policy
11 method: PUT
12 json:
13 {}
14 headers:
15 content-type: application/json
16 response:
17 status_code: 200
18 body:
19 ACK_FROM: DELAYED_TEST
20 status: SUCCESS
21
22
23---
24
25test_name: test admission control
26
27stages:
28 - name: test the admission control policy
29 request:
Tommy Carpenter24514462019-07-16 11:25:52 -040030 url: http://localhost:10000/ric/policies/admission_control_policy
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040031 method: PUT
32 json:
Tommy Carpenter24514462019-07-16 11:25:52 -040033 enforce: true
34 window_length: 10
35 blocking_rate: 20
36 trigger_threshold: 10
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040037 headers:
38 content-type: application/json
39 response:
40 status_code: 200
41 body:
42 ACK_FROM: ADMISSION_CONTROL
43 status: SUCCESS
44
45---
46
47test_name: bad_requests
48
49stages:
50 - name: does not exist
51 request:
52 url: http://localhost:10000/ric/policies/darkness
53 method: PUT
54 json:
55 {}
56 headers:
57 content-type: application/json
58 response:
59 status_code: 404
60
Tommy Carpenter24514462019-07-16 11:25:52 -040061 - name: bad body for admission control policy
62 request:
63 url: http://localhost:10000/ric/policies/admission_control_policy
64 method: PUT
65 json:
66 not: "expected"
67 headers:
68 content-type: application/json
69 response:
70 status_code: 400
71
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040072 - name: not a json
73 request:
Tommy Carpenter24514462019-07-16 11:25:52 -040074 url: http://localhost:10000/ric/policies/admission_control_policy
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040075 method: PUT
76 data: "asdf"
77 response:
78 status_code: 415
79
Tommy Carpenter24514462019-07-16 11:25:52 -040080 - name: bad body for test policy
Tommy Carpenter5ad8f032019-05-30 14:33:21 -040081 request:
82 url: http://localhost:10000/ric/policies/test_policy
83 method: PUT
84 json:
85 not: "welcome"
86 response:
87 status_code: 400