Skip to content

Commit

Permalink
Add hurl in tools/ for login, status and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fridim committed Feb 15, 2024
1 parent 1d11338 commit 572d1cd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/login.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#################################################################################
# Get an access token using the login token
#################################################################################

GET {{host}}/api/v1/login
Authorization: Bearer {{login_token}}
HTTP 200
[Asserts]
jsonpath "$.access_token" isString
jsonpath "$.access_token_exp" isString
7 changes: 7 additions & 0 deletions tools/sandbox_mark_for_cleanup.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#################################################################################
# Stop a placement
#################################################################################

PUT {{host}}/api/v1/accounts/{{type}}/{{name}}/cleanup
Authorization: Bearer {{access_token}}
HTTP 200
25 changes: 25 additions & 0 deletions tools/sandbox_status.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#n################################################################################
# Get status
#################################################################################

PUT {{host}}/api/v1/accounts/{{type}}/{{name}}/status
Authorization: Bearer {{access_token}}
HTTP 202
[Captures]
r_status: jsonpath "$.request_id"
[Asserts]
jsonpath "$.message" == "status request created"

GET {{host}}/api/v1/requests/{{r_status}}/status
Authorization: Bearer {{access_token}}
[Options]
retry: 140
HTTP 200
[Asserts]
jsonpath "$.status" == "success"


# Get status
GET {{host}}/api/v1/accounts/{{type}}/{{name}}/status
Authorization: Bearer {{access_token}}
HTTP 200

0 comments on commit 572d1cd

Please sign in to comment.