Determine testing methodology #14

Merged
tepichord merged 9 commits from feat/11-determine-testing-methodology into main 2026-08-19 08:56:13 -07:00
Owner

Closes #11

Automated PR created by forgejo-done adapter.

Closes #11 Automated PR created by forgejo-done adapter.
|| truec → || true

Refs: #11
Wrap main "$@" in BASH_SOURCE check so BATS can source the file
and test individual functions without triggering main.

Refs: #11
Add python3, pytest, shellcheck, hadolint, yamllint,
bats-with-libraries, and ruff to buildInputs.

Refs: #11
- pyproject.toml with addopts = "-v"
- tests/test_static.py: terraform fmt, shellcheck, hadolint, yamllint, ruff
- tests/test_terraform.py: terraform test wrapper
- tests/test_shell.py: BATS wrapper

Refs: #11
Mock libvirt and talos providers to test offline:
- Verify network subnet is 10.5.0.1
- Verify control plane disk is 40GB

Refs: #11
Test generate_mac produces valid MAC addresses and
create_vm_dir creates directories correctly.

Refs: #11
Refs: #11
Tests that depend on external tools (terraform, shellcheck, hadolint,
yamllint, ruff, bats) now gracefully skip via pytest.mark.skipif when
the tool is not found on PATH, instead of raising FileNotFoundError.

Also adds .gitignore for __pycache__ and .pytest_cache.
All lint tools (terraform fmt, shellcheck, hadolint, yamllint, ruff)
write diagnostics to stdout, not stderr. Using only r.stderr.decode()
produced empty assertion messages on failure, making test failures
undebuggable. Switched to (r.stdout + r.stderr).decode() to capture
all output regardless of which stream the tool uses.
tepichord deleted branch feat/11-determine-testing-methodology 2026-08-19 08:56:13 -07:00
tepichord referenced this pull request from a commit 2026-08-19 08:56:14 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tepichord/milner!14
No description provided.