Snider
8ab8643e88
test(ansible): Phase 1 Step 1.5 — error propagation, become, facts & idempotency
...
104 new tests covering cross-cutting concerns:
- Error propagation (68): getHosts, matchesTags, evaluateWhen,
templateString, applyFilter, resolveLoop, handleNotify, normalizeConditions
- Become/sudo (8): enable/disable, passwordless, default user
- Fact gathering (9): Ubuntu/CentOS/Alpine/Debian os-release parsing
- Idempotency (8): group exists, key present, docker compose up-to-date
Total ansible tests: 438. Phase 1 complete.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:58:27 +00:00
Snider
427929f0e9
test(ansible): Phase 1 Step 1.4 — user/group & advanced module tests
...
69 new tests for user (7), group (7), cron (5), authorized_key (7),
git (8), unarchive (8), uri (6), ufw (8), docker_compose (7), and
dispatch (6) modules. 9 module shims added to mock infrastructure.
Total ansible tests: 334, all passing.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:52:42 +00:00
Snider
9638e77f30
test(ansible): Phase 1 Step 1.3 — service & package module tests
...
56 new tests for service (12), systemd (4), apt (9), apt_key (6),
apt_repository (8), package (3), pip (8), and dispatch (7) modules.
Extended mock with 7 module shims for sshRunner interface.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:44:50 +00:00
Snider
3330e55b2b
test(ansible): Phase 1 Steps 1.0-1.1 — SSH mock + command module tests
...
Step 1.0: MockSSHClient with command registry, file system simulation,
become state tracking, execution log, upload log, and assertion helpers.
Module shims via sshRunner interface for testability.
Step 1.1: 48 tests for command/shell/raw/script modules verifying:
- command uses Run(), shell uses RunScript()
- chdir wrapping, non-zero RC, SSH error propagation
- raw passes through without shell wrapping
- script reads local file content, sends via RunScript()
- Cross-module dispatch differentiation
- Template variable resolution in args
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 02:31:48 +00:00
Snider
6e346cb2fd
test(devops): Phase 0 test coverage and hardening
...
- Fix go vet warnings across 4 files: update stale API calls in
container/linuxkit_test.go, container/state_test.go, and
devops/devops_test.go (removed io.Local arg from NewState/LoadState),
rewrite container/templates_test.go for package-level function API
- Add ansible/parser_test.go: 17 tests covering ParsePlaybook,
ParseInventory, ParseTasks, GetHosts, GetHostVars, isModule,
NormalizeModule (plays, vars, handlers, blocks, loops, roles, FQCN)
- Add ansible/types_test.go: RoleRef/Task UnmarshalYAML, Inventory
structure, Facts, TaskResult, KnownModules validation
- Add ansible/executor_test.go: executor logic (getHosts, matchesTags,
evaluateWhen, templateString, applyFilter, resolveLoop, templateArgs,
handleNotify, normalizeConditions, helper functions)
- Add infra/hetzner_test.go: HCloudClient/HRobotClient construction,
do() round-trip via httptest, API error handling, JSON serialisation
for HCloudServer, HCloudLoadBalancer, HRobotServer
- Add infra/cloudns_test.go: doRaw() round-trip via httptest, zone/record
JSON parsing, CRUD response validation, ACME challenge logic,
auth param verification, error handling
- Fix go.mod replace directive path (../go -> ../core)
- All tests pass, go vet clean, go test -race clean
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 01:36:03 +00:00
Claude
392ad68047
feat: extract devops packages from core/go
...
Build system, release automation, SDK generation, Ansible executor,
LinuxKit dev environments, container runtime, deployment, infra
metrics, and developer toolkit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:21:39 +00:00