forked from inspirehep/inspirehep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: fixed set_schema and create_ticket_on_author_update
- Loading branch information
Showing
5 changed files
with
160 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
workflows/tests/cassettes/TestAuthorCreateInit.test_set_schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
interactions: | ||
- request: | ||
body: '{"data": {"$schema": "https://inspirehep.net/schemas/records/authors.json", | ||
"_collections": ["Authors"], "acquisition_source": {"datetime": "2024-11-18T11:34:19.809575", | ||
"email": "[email protected]", "internal_uid": 50872, "method": "submitter", | ||
"orcid": "0000-0002-7638-5686", "source": "submitter"}, "name": {"preferred_name": | ||
"Third B", "value": "B, Third"}, "status": "active"}}' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '393' | ||
Content-Type: | ||
- application/json | ||
method: PATCH | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
response: | ||
body: | ||
string: '{"id":"00000000-0000-0000-0000-000000001521","tickets":[],"decisions":[],"data":{"$schema":"https://inspirehep.net/schemas/records/authors.json","_collections":["Authors"],"acquisition_source":{"datetime":"2024-11-18T11:34:19.809575","email":"[email protected]","internal_uid":50872,"method":"submitter","orcid":"0000-0002-7638-5686","source":"submitter"},"name":{"preferred_name":"Third | ||
B","value":"B, Third"},"status":"active"},"workflow_type":"AUTHOR_CREATE","status":"running","_created_at":"2024-11-25T13:49:53.009000Z","_updated_at":"2024-11-26T14:13:56.571976Z"}' | ||
headers: | ||
Allow: | ||
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS | ||
Content-Language: | ||
- en | ||
Content-Length: | ||
- '580' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Tue, 26 Nov 2024 14:13:56 GMT | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Vary: | ||
- Accept, Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
91 changes: 91 additions & 0 deletions
91
workflows/tests/cassettes/TestAuthorUpdate.test_create_ticket_on_author_update.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
interactions: | ||
- request: | ||
body: '{"functional_category": "Author updates", "template": "curator_update_author", | ||
"subject": "Update to author Third B on INSPIRE", "template_context": {"url": | ||
"https://inspirebeta.net/authors/12345", "bibedit_url": "https://inspirebeta.net/record/12345", | ||
"url_author_form": "https://inspirebeta.net/submissions/authors/12345"}, "caller_email": | ||
"[email protected]"}' | ||
headers: | ||
Accept: | ||
- application/vnd+inspire.record.raw+json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '373' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: https://inspirebeta.net/api/tickets/create | ||
response: | ||
body: | ||
string: '{"ticket_id":"9e67066e8746d250225886640cbb3565","ticket_url":"https://cerntraining.service-now.com/nav_to.do?uri=/u_request_fulfillment.do?sys_id=9e67066e8746d250225886640cbb3565"} | ||
' | ||
headers: | ||
access-control-allow-origin: | ||
- '*' | ||
access-control-expose-headers: | ||
- Content-Type, ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset | ||
alt-svc: | ||
- h3=":443";ma=60; | ||
content-length: | ||
- '181' | ||
content-type: | ||
- application/json | ||
date: | ||
- Tue, 26 Nov 2024 15:00:51 GMT | ||
server: | ||
- gunicorn/19.10.0 | ||
x-proxy-backend: | ||
- inspire-qa_hep-web_http | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: '{"ticket_type": "author_update_curation", "ticket_id": "9e67066e8746d250225886640cbb3565", | ||
"workflow": "00000000-0000-0000-0000-000000001521"}' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '142' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://host.docker.internal:8001/api/workflows/authors/tickets/ | ||
response: | ||
body: | ||
string: '{"id":3,"ticket_url":"https://cerntraining.service-now.com/nav_to.do?uri=/u_request_fulfillment.do?sys_id=9e67066e8746d250225886640cbb3565","workflow":"00000000-0000-0000-0000-000000001521","ticket_id":"9e67066e8746d250225886640cbb3565","ticket_type":"author_update_curation","_created_at":"2024-11-26T15:00:51.801217Z","_updated_at":"2024-11-26T15:00:51.801236Z"}' | ||
headers: | ||
Allow: | ||
- GET, POST, HEAD, OPTIONS | ||
Content-Language: | ||
- en | ||
Content-Length: | ||
- '364' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Tue, 26 Nov 2024 15:00:51 GMT | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Vary: | ||
- Accept, Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
status: | ||
code: 201 | ||
message: Created | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters