Skip to content

Commit

Permalink
tests: Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jpramos123 committed Dec 12, 2024
1 parent 4ded3a7 commit 952eaa5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_custom_staleness.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
"immutable_time_to_delete": 15552000,
}

CUSTOM_STALENESS_HOST_BECAME_STALE = {
"conventional_time_to_stale": 1,
"conventional_time_to_stale_warning": 604800,
"conventional_time_to_delete": 1209600,
"immutable_time_to_stale": 172800,
"immutable_time_to_stale_warning": 10368000,
"immutable_time_to_delete": 15552000,
}


def test_delete_only_immutable_hosts(
flask_app,
Expand Down
8 changes: 8 additions & 0 deletions tests/test_notifications.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import json
import os
from unittest import mock

import pytest

Expand Down Expand Up @@ -62,6 +64,12 @@ def test_add_host_fail(mq_create_or_update_host, notification_event_producer_moc


# System Became Stale
@mock.patch.dict(os.environ, {"STALE_OFFSET_SECONDS": "10"}, clear=True)
def test_system_became_stale(notification_event_producer_mock, db_create_staleness_culling):
# db_create_staleness_culling(**CUSTOM_STALENESS_HOST_BECAME_STALE)
# host = minimal_host(org_id=SYSTEM_IDENTITY["org_id"])
pass


# System Deleted

Expand Down

0 comments on commit 952eaa5

Please sign in to comment.