snapshot: Fix functional test to account for non-removable snapshots

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Sunil Mohan Adapa 2020-05-20 11:16:43 -07:00 committed by Joseph Nuthalapati
parent aa414eb68b
commit 863789e47e
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ Background:
Scenario: Create a snapshot
Given the list of snapshots is empty
When I manually create a snapshot
Then there should be 1 snapshot in the list
Then there should be 1 more snapshots in the list
Scenario: Configure snapshots
Given snapshots are configured with free space 30, timeline snapshots disabled, software snapshots disabled, hourly limit 10, daily limit 3, weekly limit 2, monthly limit 2, yearly limit 0

View File

@ -13,6 +13,7 @@ scenarios('snapshot.feature')
@given('the list of snapshots is empty')
def empty_snapshots_list(session_browser):
_delete_all(session_browser)
return _get_count(session_browser)
@when('I manually create a snapshot')
@ -20,10 +21,9 @@ def create_snapshot(session_browser):
_create(session_browser)
@then(parsers.parse('there should be {count:d} snapshot in the list'))
def verify_snapshot_count(session_browser, count):
num_snapshots = _get_count(session_browser)
assert num_snapshots == count
@then(parsers.parse('there should be {count:d} more snapshots in the list'))
def verify_snapshot_count(session_browser, count, empty_snapshots_list):
assert _get_count(session_browser) == count + empty_snapshots_list
@given(