mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
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:
parent
aa414eb68b
commit
863789e47e
@ -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
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user