1- test_name : retrieving contributions
2-
3- # TODO test public response without API key
4- # TODO test public vs private projects
1+ test_name : authenticated retrieval of contributions
52
63stages :
7- - name : get a random contribution with all fields
4+ - name : get a contribution with all fields
85 request :
96 url : " {tavern.env_vars.MP_CONTRIBS_API_URL}/contributions/"
107 method : GET
@@ -20,29 +17,29 @@ stages:
2017 status_code : 200
2118 save :
2219 json :
23- contrib : " data[0]"
20+ contrib_auth : " data[0]"
2421
2522 - name : retrieve single contribution with default fields
2623 request :
27- url : " {tavern.env_vars.MP_CONTRIBS_API_URL}/contributions/{contrib .id:s}/"
24+ url : " {tavern.env_vars.MP_CONTRIBS_API_URL}/contributions/{contrib_auth .id:s}/"
2825 method : GET
2926 headers :
3027 accept : application/json
3128 X-API-KEY : " {tavern.env_vars.MP_API_KEY}"
3229 response :
3330 status_code : 200
3431 json :
35- id : " {contrib .id}"
36- project : " {contrib .project}"
37- identifier : " {contrib .identifier}"
38- formula : " {contrib .formula}"
39- is_public : !bool "{contrib .is_public}"
40- last_modified : " {contrib .last_modified}"
41- needs_build : !bool "{contrib .needs_build}"
32+ id : " {contrib_auth .id}"
33+ project : " {contrib_auth .project}"
34+ identifier : " {contrib_auth .identifier}"
35+ formula : " {contrib_auth .formula}"
36+ is_public : !bool "{contrib_auth .is_public}"
37+ last_modified : " {contrib_auth .last_modified}"
38+ needs_build : !bool "{contrib_auth .needs_build}"
4239
4340 - name : retrieve single contribution with all fields
4441 request :
45- url : " {tavern.env_vars.MP_CONTRIBS_API_URL}/contributions/{contrib .id:s}/"
42+ url : " {tavern.env_vars.MP_CONTRIBS_API_URL}/contributions/{contrib_auth .id:s}/"
4643 params :
4744 _fields : _all
4845 method : GET
@@ -51,4 +48,4 @@ stages:
5148 X-API-KEY : " {tavern.env_vars.MP_API_KEY}"
5249 response :
5350 status_code : 200
54- json : !force_original_structure "{contrib }"
51+ json : !force_original_structure "{contrib_auth }"
0 commit comments