Add comprehensive E2E tests for materia CLI

- Add pytest and pytest-cov for testing
- Add niquests for modern HTTP/2 support (keep requests for hcloud compatibility)
- Create 13 E2E tests covering CLI, workers, pipelines, and secrets (71% coverage)
- Fix Pulumi ESC environment path (beanflows/prod) and secret key names
- Update GitLab CI to run CLI tests with coverage reporting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Deeman
2025-10-12 21:32:51 +02:00
parent ca308a7275
commit 5ce112f44d
11 changed files with 415 additions and 107 deletions

View File

@@ -10,13 +10,13 @@ def _load_environment() -> dict[str, str]:
"""Load secrets from Pulumi ESC environment."""
try:
result = subprocess.run(
["esc", "env", "open", "prod", "--format", "json"],
["esc", "env", "open", "beanflows/prod", "--format", "json"],
capture_output=True,
text=True,
check=True,
)
data = json.loads(result.stdout)
return data.get("values", {})
return data.get("environmentVariables", {})
except subprocess.CalledProcessError as e:
raise RuntimeError(f"Failed to load ESC environment: {e.stderr}")
except FileNotFoundError: