Skip to content

Commit

Permalink
test(robot-server): upload, analyze, delete basic_transfer_standalone…
Browse files Browse the repository at this point in the history
… protocol (#9219)

HTTP integration test for basic uploading, successful analysis, deleting a python protocol.
  • Loading branch information
y3rsh authored Mar 22, 2022
1 parent f7988cb commit 15cf382
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 97 deletions.
Empty file.
Empty file.
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

This file was deleted.

0 comments on commit 15cf382

Please sign in to comment.