Skip to content

tests: increase coverage to 93% and report to Codecov - #29

Merged
paulmueller merged 1 commit into
DCOR-dev:masterfrom
paulmueller-agent:more-tests
Nov 5, 2026
Merged

paulmueller merged 1 commit into
DCOR-dev:masterfrom
paulmueller-agent:more-tests

Conversation

@paulmueller-agent

Copy link
Copy Markdown

Adds simple tests for most of dcor_control. Shell commands (ckan, pip, git, supervisorctl, pg_dump, gpg) are mocked, so the tests do not change the CKAN installation.

  • New tests for the CLI commands (develop, inspect, reset, status, update, encrypted-instance-backup), update (update_package via pip/git, get_package_version_git), inspect (permission checks, ckan.ini options, site configuration with templates and branding paths), backup and util.
  • The dcor_control configuration directory is redirected to a temporary directory (tests/conftest.py).
  • Tests that write to hard-coded paths (/backups, /dcor-repos) are skipped when not running as root; in CI they run.
  • fix: check_permission (used by dcor inspect) crashed with FileNotFoundError when the user declined to create a missing directory.
  • CI: coverage was measured for ckanext.dcor_schemas instead of dcor_control. Coverage is now uploaded to Codecov (same setup as the other repositories).

Coverage: 93% (89 tests); both CI jobs pass on the fork.

🤖 Generated with Claude Code

- fix: do not crash when declining to create a missing directory
- ci: measure coverage of dcor_control and report to Codecov

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@paulmueller
paulmueller merged commit 5ee7e76 into DCOR-dev:master Nov 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants