From de89bce63b1912098a0a9ee019b0e2f968c3a2a2 Mon Sep 17 00:00:00 2001 From: Ephraim Anierobi Date: Mon, 25 Nov 2024 18:14:30 +0100 Subject: [PATCH] skip_archive should not delete _xcom_archive tables since that was created by migration --- tests/utils/test_db_cleanup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/utils/test_db_cleanup.py b/tests/utils/test_db_cleanup.py index 7633812d18086..193e2240abb37 100644 --- a/tests/utils/test_db_cleanup.py +++ b/tests/utils/test_db_cleanup.py @@ -277,11 +277,13 @@ def test__cleanup_table(self, table_name, date_add_kwargs, expected_to_delete, e @pytest.mark.parametrize( "skip_archive, expected_archives", - [pytest.param(True, 0, id="skip_archive"), pytest.param(False, 1, id="do_archive")], + [pytest.param(True, 1, id="skip_archive"), pytest.param(False, 2, id="do_archive")], ) def test__skip_archive(self, skip_archive, expected_archives): """ Verify that running cleanup_table with drops the archives when requested. + + Archived tables from DB migration should be kept when skip_archive is True. """ base_date = pendulum.DateTime(2022, 1, 1, tzinfo=pendulum.timezone("UTC")) num_tis = 10