feat(storage): add native PostgreSQL runtime and verified offline application import
Build and publish container images / images (push) Failing after 12m29s
Build and publish container images / images (push) Failing after 12m29s
This commit is contained in:
1 parent
96065d1e89
commit
0ba1dcfef0
243 files changed
+21441
-3090
No files matched your search
@@ -312,6 +312,9 @@ class PagesWikiCLI:
|
||||
)
|
||||
|
||||
def __init__(self) -> None:
|
||||
backend = os.environ.get("PAGESWIKI_DB_BACKEND", "sqlite").strip().lower() or "sqlite"
|
||||
if backend != "sqlite":
|
||||
raise CLIError("Local data CLI requires SQLite; use the HTTP pages-cli for PostgreSQL")
|
||||
script_dir = Path(__file__).resolve().parent
|
||||
self.data_dir = Path(
|
||||
os.environ.get("PAGESWIKI_DATA_DIR", script_dir)
|
||||
|
||||
@@ -10,6 +10,11 @@ from pageswiki_cli_test import pageswiki_cli
|
||||
|
||||
|
||||
class DRGuardTest(unittest.TestCase):
|
||||
def test_postgresql_rejected_before_database_open(self):
|
||||
with patch.dict(os.environ, {"PAGESWIKI_DB_BACKEND": "postgresql"}):
|
||||
with self.assertRaisesRegex(pageswiki_cli.CLIError, "HTTP pages-cli"):
|
||||
pageswiki_cli.PagesWikiCLI()
|
||||
|
||||
def test_standby_rejected_before_database_open(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
|
||||
Reference in new issue
Block a user