Initialize isolated database before agent tests
This commit is contained in:
@@ -52,3 +52,14 @@ def test_pr_requires_gitea_token() -> None:
|
||||
config = settings(mode="pr", dry_run=False)
|
||||
with pytest.raises(ValueError, match="GITEA_TOKEN"):
|
||||
config.validate()
|
||||
|
||||
|
||||
def test_default_commands_initialize_disposable_laravel_schema(monkeypatch) -> None:
|
||||
monkeypatch.setenv("FAILURE_DB_PASSWORD", "failure-secret")
|
||||
monkeypatch.setenv("TEST_DB_PASSWORD", "test-secret")
|
||||
monkeypatch.delenv("TEST_COMMANDS", raising=False)
|
||||
|
||||
config = Settings.from_env()
|
||||
|
||||
assert "php artisan migrate:fresh --force" in config.test_commands
|
||||
assert config.test_commands[-1] == "php artisan test"
|
||||
|
||||
Reference in New Issue
Block a user