Skip to content

[Task]: Refactor and extend BATS test suite for repository restructure and artifact installer #148

@oehrlis

Description

@oehrlis

Task Description

Refactor and expand BATS unit and integration tests to match new repository structure, packaging, installer flows, and migration from legacy payload layout. Integrate into Makefile/CI, fill test coverage and document for smooth onboarding and regression safety.

Task Type

Refactoring

Affected Component

Tests (BATS)

Priority

High (Important, should be done soon)

Motivation

Strong BATS coverage for core scripts/install/migration ensures robust packaging, safe onboarding/contribution, and reliable regression/upgrade validation as repo structure shifts.

Implementation Plan

  1. Audit existing BATS and test location/coverage
  2. Move/refactor to unit/integration, rewrite for installer/artifact migration
  3. Add missing tests for installer, migration, error and integration
  4. Update Makefile and CI for new test paths
  5. Update docs for testing usage
  6. Peer test and review

Files to Modify

- tests/unit/*.bats (move or update)
- tests/integration/*.bats (write or update)
- Makefile
- CI workflow for tests
- README.md
- Add/fix test fixtures/scripts

Code Examples

Testing Approach

  • All BATS tests pass in local (make test) and CI
  • Installer and migration flows validated in both modes
  • Coverage peer reviewed for install, migration, and error
  • Test add/run/debub docs confirmed by contributor(s)

Acceptance Criteria

  • Refactored and new BATS tests for unit/integration
  • Installer, migration, error scenarios covered
  • Tests run from Makefile and CI
  • Docs (README/test/contrib) updated
  • Peer reviewed and verified on clean system

Breaking Changes

No breaking changes

Dependencies

  • Blocked by packaging-installer-migration and repo restructure issues
  • Depends on new install/build scripts and Makefile
  • Related to doc/contributor guide updates

Risks and Considerations

  • Risk of missing edge install/migration scenarios
  • Test pipeline or fixtures breakage from repo moves
  • Gaps in docs for developers/testers

Estimated Effort

No response

Subtasks

- [ ] Audit and refactor tests/unit
- [ ] Write/expand tests/integration
- [ ] Integrate with CI pipeline and Makefile
- [ ] Update contributor docs
- [ ] Peer review

Documentation Updates Required

  • README.md (testing/docs section)
  • CONTRIBUTING.md (test suite guidance)
  • Inline BATS script comments

Additional Notes

No response

Pre-submission Checklist

  • I have searched existing issues to avoid duplicates
  • I have provided a clear implementation plan
  • I have defined acceptance criteria
  • I have considered backward compatibility

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions