Skip to content

Implement detailed install/uninstall tests with bats #83

Description

@nirs

Summary

The current install workflow provides basic verification but lacks detailed permission/ownership checks and can only run on GitHub.

Goals

  1. Comprehensive testing:

    • Verify file permissions and ownership (root:wheel for install dir, _vmnetbroker for log dir)
    • Verify system user/group creation with correct attributes
    • Verify service registration and state
    • Verify all files are removed on uninstall
  2. Local testing:

    • Implement as bats tests instead of inline GitHub Actions YAML
    • Allow developers to run install tests locally
    • GitHub workflow calls the bats tests

Current gaps

  • Testing install from local tar duplicate workflow tests
  • Installing from local script not tested with latest release
  • Wrong permissions pass (only visible in logs, no assertion)
  • Tests only run on GitHub, not locally
  • Duplicated verification logic between workflow and scripts

Implementation

  • Create test/install.bats with comprehensive checks
  • Update workflow to call bats tests
  • Add make test-install target (requires sudo)?

Example bad changes not detected by the current test

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