feat: add hub-core database lease projections
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
codex 2026-08-21 17:30:44 +02:00
parent 77f2535369
commit bb7cfcb184
5 changed files with 121 additions and 0 deletions

View file

@ -183,6 +183,8 @@ class CredentialChangeTests(unittest.TestCase):
).read_text()
self.assertIn('path "database/creds/core-hub-runtime"', database_policy)
self.assertIn('path "database/creds/core-hub-migration"', database_policy)
self.assertIn('path "database/creds/hub-core-runtime"', database_policy)
self.assertIn('path "database/creds/hub-core-migration"', database_policy)
self.assertNotIn("platform/data/", database_policy)
database_store = credential_change.load_yaml(
@ -204,6 +206,8 @@ class CredentialChangeTests(unittest.TestCase):
"core-hub-api-token",
"core-hub-runtime-database",
"core-hub-migration-database",
"hub-core-runtime-database",
"hub-core-migration-database",
},
)
for item in external_secrets:
@ -219,6 +223,22 @@ class CredentialChangeTests(unittest.TestCase):
)
self.assertEqual(runtime["spec"]["dataFrom"][0]["extract"]["key"], "creds/core-hub-runtime")
self.assertEqual(migration["spec"]["dataFrom"][0]["extract"]["key"], "creds/core-hub-migration")
hub_runtime = next(
item for item in external_secrets
if item["metadata"]["name"] == "hub-core-runtime-database"
)
hub_migration = next(
item for item in external_secrets
if item["metadata"]["name"] == "hub-core-migration-database"
)
self.assertEqual(
hub_runtime["spec"]["dataFrom"][0]["extract"]["key"],
"creds/hub-core-runtime",
)
self.assertEqual(
hub_migration["spec"]["dataFrom"][0]["extract"]["key"],
"creds/hub-core-migration",
)
def test_target_rapp_rejects_non_slug(self) -> None:
path = self.unapproved_ccr()