Fix missing 400 impl, update test manifest
[ric-plt/a1.git] / integration_tests / test_a1.tavern.yaml
1 # test_a1.tavern.yaml
2
3 ---
4
5 test_name: test delayed policy
6
7 stages:
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
25 test_name: test admission control
26
27 stages:
28   - name: test the admission control policy
29     request:
30       url: http://localhost:10000/ric/policies/admission_control_policy
31       method: PUT
32       json:
33         enforce: true
34         window_length: 10
35         blocking_rate: 20
36         trigger_threshold: 10
37       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
47 test_name: bad_requests
48
49 stages:
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
61   - 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
72   - name: not a json
73     request:
74       url: http://localhost:10000/ric/policies/admission_control_policy
75       method: PUT
76       data: "asdf"
77     response:
78       status_code: 415
79
80   - name: bad body for test policy
81     request:
82       url: http://localhost:10000/ric/policies/test_policy
83       method: PUT
84       json:
85         not: "welcome"
86     response:
87       status_code: 400