Skip to content

Commit

Permalink
skip_archive should not delete _xcom_archive tables since that was cr…
Browse files Browse the repository at this point in the history
…eated by migration
  • Loading branch information
ephraimbuddy committed Nov 25, 2024
1 parent 5d9395d commit de89bce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/utils/test_db_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de89bce

Please sign in to comment.