import pathlib import unittest ROOT = pathlib.Path(__file__).resolve().parents[1] class NtfyManifestTest(unittest.TestCase): def test_app_kustomization_does_not_own_cluster_ntfy_resources(self): source = (ROOT / 'deploy/k8s/base/kustomization.yaml').read_text() self.assertNotIn('utility-namespace.yaml', source) self.assertNotIn('ntfy.yaml', source) self.assertFalse((ROOT / 'deploy/k8s/base/utility-namespace.yaml').exists()) self.assertFalse((ROOT / 'deploy/k8s/base/ntfy.yaml').exists()) def test_unrip_services_receive_internal_notification_endpoint(self): source = (ROOT / 'deploy/k8s/base/unrip.yaml').read_text() self.assertIn('NOTIFICATION_NTFY_BASE_URL: http://ntfy.utility.svc.cluster.local', source) self.assertIn('NOTIFICATION_NTFY_TOPIC: unrip', source) def test_app_workflow_does_not_wait_on_cluster_owned_ntfy(self): source = (ROOT / '.forgejo/workflows/deploy.yml').read_text() self.assertNotIn('deployment/ntfy', source) if __name__ == '__main__': unittest.main()