Skip to content

Commit

Permalink
api tests troubleshoot publication happy flow
Browse files Browse the repository at this point in the history
  • Loading branch information
claravox committed Oct 4, 2024
1 parent 370d104 commit a98037a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/features/api/api_vault.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ Feature: Vault API
| /tempZone/home/vault-default-2 |
| /tempZone/home/vault-core-2 |
| /tempZone/home/vault-default-3 |


Scenario Outline: Published vault package passes troubleshooting script checks
Given user technicaladmin is authenticated
And data package exists in <vault>
Then data package in <vault> passes troubleshooting script checks

Examples:
| vault |
| /tempZone/home/vault-default-2 |
| /tempZone/home/vault-default-3 |


Scenario Outline: Vault preservable formats lists
Expand Down
15 changes: 15 additions & 0 deletions tests/step_defs/api/common_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,21 @@ def data_package_status(user, vault, data_package, status):
raise AssertionError()


@then(parsers.parse('data package in {vault} passes troubleshooting script checks'))
def api_vault_batch_troubleshoot(user, vault, data_package):
http_status, result = api_request(
user,
"batch_troubleshoot_published_data_packages",
{"requested_package": data_package, "log_file": True, "offline": True}
)
assert http_status == 200
data = result['data']
assert len(data) == 1
# Confirm that all checks passed for this data package
for checks in data.values():
assert all(checks.values())


@then('preservable formats lists are returned')
def preservable_formats_lists(api_response):
http_status, body = api_response
Expand Down

0 comments on commit a98037a

Please sign in to comment.