-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(robot-server): upload, analyze, delete basic_transfer_standalone…
… protocol (#9219) HTTP integration test for basic uploading, successful analysis, deleting a python protocol.
- Loading branch information
Showing
4 changed files
with
68 additions
and
97 deletions.
There are no files selected for viewing
Empty file.
Empty file.
68 changes: 68 additions & 0 deletions
68
robot-server/tests/integration/http_api/protocols/test_upload.tavern.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,68 @@ | ||
test_name: Upload, analyze, delete basic_transfer_standalone protocol. | ||
|
||
marks: | ||
- usefixtures: | ||
- run_server | ||
stages: | ||
- name: Upload basic_transfer_standalone protocol | ||
request: | ||
url: '{host:s}:{port:d}/protocols' | ||
method: POST | ||
files: | ||
files: 'tests/integration/protocols/basic_transfer_standalone.py' | ||
response: | ||
save: | ||
json: | ||
protocol_id: data.id | ||
analyses_id: data.analyses[0].id | ||
status_code: 201 | ||
json: | ||
data: | ||
id: !anystr | ||
protocolType: python | ||
files: | ||
- name: basic_transfer_standalone.py | ||
role: main | ||
createdAt: !re_search "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+\\+\\d{2}:\\d{2}$" | ||
metadata: | ||
apiLevel: '2.6' | ||
protocolName: basic_transfer_standalone | ||
author: [email protected] | ||
analyses: | ||
- id: !anystr | ||
status: pending | ||
- name: Retry until analyses status is completed and result is ok. | ||
max_retries: 5 | ||
delay_after: 1 | ||
request: | ||
url: '{host:s}:{port:d}/protocols' | ||
method: GET | ||
response: | ||
strict: | ||
- json:off | ||
status_code: 200 | ||
json: | ||
data: | ||
- id: '{protocol_id}' | ||
analyses: | ||
- id: '{analyses_id}' | ||
status: completed | ||
result: ok | ||
- name: Delete the protocol | ||
request: | ||
url: '{host:s}:{port:d}/protocols/{protocol_id}' | ||
method: DELETE | ||
response: | ||
status_code: 200 | ||
- name: Get protocol with id to verify it is deleted | ||
request: | ||
url: '{host:s}:{port:d}/protocols/{protocol_id}' | ||
method: GET | ||
response: | ||
strict: | ||
- json:off | ||
status_code: 404 | ||
json: | ||
errors: | ||
- id: ProtocolNotFound | ||
title: Protocol Not Found |
97 changes: 0 additions & 97 deletions
97
robot-server/tests/integration/protocols/test_upload.tavern_outdated.yaml
This file was deleted.
Oops, something went wrong.