oxidecomputer / oxidecomputer/packer-plugin-oxide
Expand acceptance test coverage (SSH path, -force, skip_create_image, user_data, data source assertions)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 3
Description
Problem
All builder acceptance templates use communicator = "none", so the plugin's core value path is never exercised even when acceptance tests run: temp SSH key generation, Oxide SSH-key create/delete, external IP listing, StepConnect, and provisioning.
Untested configuration surface: -force (both conflict and no-conflict — see oxidecomputer/packer-plugin-oxide#101/oxidecomputer/packer-plugin-oxide#102), skip_create_image, user_data, ip_pool, ssh_public_keys. The data source acceptance test only asserts exit code 0 and never verifies the image_id output value.
Test smells to fix while in here:
Checkfunctions only assert whenbuildCommand.ProcessState != nil, so a hung/unstarted command passes silently.assertFileContainspasses the expected string toregexp.MatchString, so expectations containing regex metacharacters will silently mis-match.
Fix
- Add an acceptance case with
communicator = "ssh"and a trivial shell provisioner. - Add cases for
-force,skip_create_image, anduser_data. - Assert data source output values (e.g., via a locals/manifest trick or log assertion).
- Fix the
Check/assertFileContainssmells.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the builder acceptance templates and the data source acceptance test mentioned in the issue, then inspect the Check functions and assertFileContains helper. Run the acceptance tests while covering SSH, -force, skip_create_image, and user_data cases. Done means the core SSH and provisioning path is exercised, data source image_id output is verified, and hung commands or literal expected strings cannot pass silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100