2022-10-19 17:39:46 +03:00
|
|
|
# Create a new job
|
|
|
|
POST http://localhost:8000/jobs
|
|
|
|
|
2022-11-11 16:25:00 +03:00
|
|
|
HTTP 201
|
2022-10-19 17:39:46 +03:00
|
|
|
[Captures]
|
|
|
|
job_id: jsonpath "$.id"
|
|
|
|
[Asserts]
|
|
|
|
jsonpath "$.state" == "RUNNING"
|
|
|
|
|
|
|
|
|
|
|
|
# Pull job status until it is completed
|
|
|
|
GET http://localhost:8000/jobs/{{job_id}}
|
|
|
|
[Options]
|
2023-05-26 16:53:53 +03:00
|
|
|
retry: 10
|
2022-10-19 18:18:52 +03:00
|
|
|
retry-interval: 100
|
2022-10-19 17:39:46 +03:00
|
|
|
|
2022-11-11 16:25:00 +03:00
|
|
|
HTTP 200
|
2022-10-19 17:39:46 +03:00
|
|
|
[Asserts]
|
|
|
|
jsonpath "$.state" == "COMPLETED"
|
|
|
|
|
|
|
|
|
|
|
|
# Delete the job
|
|
|
|
DELETE http://localhost:8000/jobs/{{job_id}}
|
2022-11-11 16:25:00 +03:00
|
|
|
HTTP 200
|
2022-10-19 17:39:46 +03:00
|
|
|
|
|
|
|
GET http://localhost:8000/jobs/{{job_id}}
|
2022-11-11 16:25:00 +03:00
|
|
|
HTTP 404
|