Skip to content

Commit 456bc4d

Browse files
committed
Fix update_config_monitor test
1 parent 80a98cb commit 456bc4d

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def skaled_mock_image(scope='module'):
619619

620620
@pytest.fixture
621621
def cleanup_schain_dirs_before():
622-
shutil.rmtree(SCHAINS_DIR_PATH)
622+
shutil.rmtree(SCHAINS_DIR_PATH, ignore_errors=True)
623623
pathlib.Path(SCHAINS_DIR_PATH).mkdir(parents=True, exist_ok=True)
624624
return
625625

@@ -743,7 +743,7 @@ def new_upstream(schain_db):
743743
Path(upath).touch()
744744
yield upath
745745
finally:
746-
shutil.rmtree(config_dir)
746+
shutil.rmtree(config_dir, ignore_errors=True)
747747

748748

749749
@pytest.fixture
@@ -781,4 +781,4 @@ def upstreams(schain_db, schain_config):
781781
json.dump(schain_config, f)
782782
yield files
783783
finally:
784-
shutil.rmtree(config_folder)
784+
shutil.rmtree(config_folder, ignore_errors=True)

tests/routes/schains_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_schain_config(skale_bp, skale, schain_config, schain_on_contracts):
5858
'status': 'ok'}
5959
finally:
6060
os.remove(filepath)
61-
shutil.rmtree(os.path.dirname(filepath))
61+
shutil.rmtree(os.path.dirname(filepath), ignore_errors=True)
6262

6363

6464
def test_schains_list(skale_bp, skale):

tests/schains/monitor/action/skaled_action_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def test_skaled_container_with_snapshot_action(skaled_am):
134134
skaled_status=skaled_am.skaled_status,
135135
download_snapshot=True,
136136
start_ts=None,
137+
ignore_reached_exit=True,
137138
dutils=skaled_am.dutils
138139
)
139140
assert monitor_schain_mock.call_count == 1
@@ -157,6 +158,7 @@ def test_skaled_container_snapshot_delay_start_action(skaled_am):
157158
skaled_status=skaled_am.skaled_status,
158159
download_snapshot=True,
159160
start_ts=ts,
161+
ignore_reached_exit=True,
160162
dutils=skaled_am.dutils
161163
)
162164
assert monitor_schain_mock.call_count == 1

tests/test_nginx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def tmp_dir():
6767
try:
6868
yield path
6969
finally:
70-
shutil.rmtree(path)
70+
shutil.rmtree(path, ignore_errors=True)
7171

7272

7373
@pytest.fixture
@@ -91,7 +91,7 @@ def ssl_dir():
9191
try:
9292
yield path
9393
finally:
94-
shutil.rmtree(path)
94+
shutil.rmtree(path, ignore_errors=True)
9595

9696

9797
@pytest.fixture

0 commit comments

Comments
 (0)