blob: 5ecb69ae303deb90499fcadb61797fdbbf5437e0 [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:
30 url: http://localhost:10000/ric/policies/control_admission_time
31 method: PUT
32 json:
33 dc_admission_start_time: "10:00:00"
34 dc_admission_end_time: "11:00:00"
35 headers:
36 content-type: application/json
37 response:
38 status_code: 200
39 body:
40 ACK_FROM: ADMISSION_CONTROL
41 status: SUCCESS
42
43---
44
45test_name: bad_requests
46
47stages:
48 - name: does not exist
49 request:
50 url: http://localhost:10000/ric/policies/darkness
51 method: PUT
52 json:
53 {}
54 headers:
55 content-type: application/json
56 response:
57 status_code: 404
58
59 - name: not a json
60 request:
61 url: http://localhost:10000/ric/policies/control_admission_time
62 method: PUT
63 data: "asdf"
64 response:
65 status_code: 415
66
67 - name: body not expected
68 request:
69 url: http://localhost:10000/ric/policies/test_policy
70 method: PUT
71 json:
72 not: "welcome"
73 response:
74 status_code: 400