Skip to content

Commit

Permalink
Add pro forma tests for Client.restoreData()
Browse files Browse the repository at this point in the history
  • Loading branch information
RKrahl committed Nov 24, 2024
1 parent 9e4dd03 commit 2faeadc
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/test_06_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,30 @@ def test_restore(client, case):
# outcome of the restore() call.
print("Status of dataset %s is now %s" % (case['dsname'], status))

@pytest.mark.parametrize(("case"), markeddatasets)
def test_restoreData(client, case):
"""Test the high level call restoreData().
This is essentially a no-op as the dataset in question will
already be ONLINE. It only tests that the call does not throw an
error.
"""
dataset = getDataset(client, case)
client.restoreData([dataset])
status = client.ids.getStatus(DataSelection([dataset]))
assert status == "ONLINE"

@pytest.mark.parametrize(("case"), markeddatasets)
def test_restoreDataSelection(client, case):
"""Test the high level call restoreData().
Same as last test, but now pass a DataSelection as argument.
"""
selection = DataSelection([getDataset(client, case)])
client.restoreData(selection)
status = client.ids.getStatus(selection)
assert status == "ONLINE"

@pytest.mark.parametrize(("case"), markeddatasets)
def test_reset(client, case):
"""Call reset() on a dataset.
Expand Down

0 comments on commit 2faeadc

Please sign in to comment.