Skip to content

Tests/mocks#53

Merged
pepedinho merged 6 commits intomainfrom
tests/mocks
Oct 12, 2025
Merged

Tests/mocks#53
pepedinho merged 6 commits intomainfrom
tests/mocks

Conversation

@pepedinho
Copy link
Owner

This pull request improves the robustness of file operations, enhances test coverage for daemon watch management, and makes minor workflow and utility updates. The main focus is on restoring and updating tests for watch-related daemon operations, ensuring that file removals are safe, and making the CI workflow more flexible.

Testing improvements for daemon watch management:

  • Restored and updated previously commented-out async tests in tests/daemon_test.rs for handle_stop_watch, handle_up_watch, handle_rm_watch, and handle_list_watches, using a new build_repo helper and modernized context setup. These tests now more accurately reflect real usage and improve coverage for core daemon operations. [1] [2] [3]

Robustness and utility enhancements:

  • Improved rm_metrics_by_id in src/exec/metrics.rs to check if the metrics file exists before attempting to remove it, preventing errors if the file is missing.

Workflow and CI updates:

  • Updated the CI workflow in .github/workflows/ci.yml to prepare necessary directories before running tests and included the scheduler_test in the test suite. Also removed the restriction that tests only run on push events. [1] [2]

Minor codebase changes:

  • Made handle_stop_watch in src/daemon/server.rs public to allow direct testing and potential reuse.
  • Added additional debugging output in tests/scheduler_test.rs to aid in diagnosing pipeline test runs.

@pepedinho pepedinho added tests adding tests ci labels Oct 12, 2025
@pepedinho pepedinho merged commit 8b5fd21 into main Oct 12, 2025
8 checks passed
@pepedinho pepedinho deleted the tests/mocks branch October 12, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci tests adding tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant