Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/integration/aio/test_foreign_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from __future__ import annotations

from datetime import UTC, datetime
from typing import TYPE_CHECKING

import pytest
Expand Down Expand Up @@ -86,7 +87,7 @@ async def test__unreferenced__referenced_partition_is_kept_and_the_other_expires
config = _keep_unreferenced(events)

# Act
plan = await make_service(db_engine).plan(config, now=None)
plan = await make_service(db_engine).plan(config, now=datetime.fromisoformat(NOW).replace(tzinfo=UTC))
result = await run_maintenance(db_engine, config, at_time=NOW)

# Assert
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/aio/test_leaves.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from __future__ import annotations

from datetime import timedelta
from datetime import UTC, datetime, timedelta
from typing import TYPE_CHECKING
from unittest.mock import patch
from uuid import uuid4
Expand Down Expand Up @@ -247,7 +247,7 @@ async def test__foreign_leaves__converged_tree__costs_no_ddl(
await run_maintenance(db_engine, config, at_time=NOW)

# Act
plan = await make_service(db_engine).plan(config, now=None)
plan = await make_service(db_engine).plan(config, now=datetime.fromisoformat(NOW).replace(tzinfo=UTC))

# Assert
assert plan.findings == ()
Expand Down Expand Up @@ -295,7 +295,7 @@ async def test__foreign_leaves__grace_period__foreign_orphan_waits_with_a_commen
comment = await table_comment(db_engine, may)
kind_in_grace = await relkind(db_engine, may)
attached_in_grace = await is_attached(db_engine, may)
plan_in_grace = await make_service(db_engine).plan(config, now=None)
plan_in_grace = await make_service(db_engine).plan(config, now=datetime(2026, 8, 30, tzinfo=UTC))
dropped = await run_maintenance(db_engine, config, at_time="2026-09-10")

# Assert
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/sync/test_foreign_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from __future__ import annotations

from datetime import UTC, datetime
from typing import TYPE_CHECKING

import pytest
Expand Down Expand Up @@ -84,7 +85,7 @@ def test__unreferenced__referenced_partition_is_kept_and_the_other_expires(
config = _keep_unreferenced(events)

# Act
plan = make_service(sync_db_engine).plan(config, now=None)
plan = make_service(sync_db_engine).plan(config, now=datetime.fromisoformat(NOW).replace(tzinfo=UTC))
result = run_maintenance(sync_db_engine, config, at_time=NOW)

# Assert
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/sync/test_leaves.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from __future__ import annotations

from datetime import timedelta
from datetime import UTC, datetime, timedelta
from typing import TYPE_CHECKING
from uuid import uuid4

Expand Down Expand Up @@ -238,7 +238,7 @@ def test__foreign_leaves__converged_tree__costs_no_ddl(sync_db_engine: Engine, m
run_maintenance(sync_db_engine, config, at_time=NOW)

# Act
plan = make_service(sync_db_engine).plan(config, now=None)
plan = make_service(sync_db_engine).plan(config, now=datetime.fromisoformat(NOW).replace(tzinfo=UTC))

# Assert
assert plan.findings == ()
Expand Down Expand Up @@ -286,7 +286,7 @@ def test__foreign_leaves__grace_period__foreign_orphan_waits_with_a_comment_then
comment = table_comment(sync_db_engine, may)
kind_in_grace = relkind(sync_db_engine, may)
attached_in_grace = is_attached(sync_db_engine, may)
plan_in_grace = make_service(sync_db_engine).plan(config, now=None)
plan_in_grace = make_service(sync_db_engine).plan(config, now=datetime(2026, 8, 30, tzinfo=UTC))
dropped = run_maintenance(sync_db_engine, config, at_time="2026-09-10")

# Assert
Expand Down