Fix flake issues (#80).

This commit is contained in:
Dan Helfman 2024-12-06 16:12:01 -08:00
parent 8979f8918d
commit ae8a9db27d
5 changed files with 2 additions and 6 deletions

View File

@ -1,4 +1,3 @@
import itertools
import pathlib
IS_A_HOOK = False

View File

@ -1,5 +1,4 @@
import argparse
import json
import sys

View File

@ -55,7 +55,7 @@ def test_btrfs_create_and_list():
# Assert that the snapshot has been deleted.
assert not subprocess.check_output(
f'python3 /app/tests/end-to-end/commands/fake_btrfs.py subvolume list -s /mnt/subvolume'.split(
'python3 /app/tests/end-to-end/commands/fake_btrfs.py subvolume list -s /mnt/subvolume'.split(
' '
)
)

View File

@ -56,7 +56,7 @@ def test_zfs_create_and_list():
# Assert that the snapshot has been deleted.
assert not subprocess.check_output(
f'python3 /app/tests/end-to-end/commands/fake_zfs.py list -H -t snapshot'.split(' ')
'python3 /app/tests/end-to-end/commands/fake_zfs.py list -H -t snapshot'.split(' ')
)
finally:
shutil.rmtree(temporary_directory)

View File

@ -67,7 +67,6 @@ def test_get_logical_volumes_with_invalid_lsblk_json_errors():
'execute_command_and_capture_output'
).and_return('{')
contained = {'/mnt/lvolume', '/mnt/lvolume/subdir'}
flexmock(module.borgmatic.hooks.data_source.snapshot).should_receive(
'get_contained_directories'
).never()
@ -83,7 +82,6 @@ def test_get_logical_volumes_with_lsblk_json_missing_keys_errors():
'execute_command_and_capture_output'
).and_return('{"block_devices": [{}]}')
contained = {'/mnt/lvolume', '/mnt/lvolume/subdir'}
flexmock(module.borgmatic.hooks.data_source.snapshot).should_receive(
'get_contained_directories'
).never()