Fix integration tests by using mock_sbctl in GitHub workflow #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
USE_MOCK_SBCTL=true
environment variable to the integration test step in GitHub workflow to fix CI failuresProblem
The integration tests were failing in CI with errors like:
This happened because the GitHub runner doesn't have the
sbctl
binary installed, but the integration tests intest_real_bundle.py
require it.Solution
The codebase already has a mock implementation of sbctl in
tests/fixtures/mock_sbctl.py
and a mechanism to use it via theUSE_MOCK_SBCTL
environment variable. This PR modifies the GitHub workflow to set this environment variable when running integration tests.The change is minimal and only affects the CI environment. The real sbctl binary is still used during local development unless explicitly overridden.
Testing
USE_MOCK_SBCTL=true
environment variabletest_real_bundle.py
pass locally with the mock implementationThis fix allows CI to validate the integration tests properly without requiring the actual sbctl binary to be installed on the GitHub runner.