Updates RunOnceCommandList to a slice of strings []string and updates guiRunOnce() to pass "" if no commands are provided. This will ensure that the function addresses each case.
Testing
Basic:
➜ packer-plugin-vsphere git:(fix/run-once-command-list) make generate
2024/05/09 22:24:23 Copying "docs" to ".docs/"
2024/05/09 22:24:23 Replacing @include '...' calls in .docs/
Compiling MDX docs in '.docs' to Markdown in '.web-docs'...
➜ packer-plugin-vsphere git:(fix/run-once-command-list) make build
➜ packer-plugin-vsphere git:(fix/run-once-command-list) make test
? github.com/hashicorp/packer-plugin-vsphere [no test files]
? github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common/testing [no test files]
? github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/examples/driver [no test files]
? github.com/hashicorp/packer-plugin-vsphere/version [no test files]
ok github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone 2.923s
ok github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common 2.614s
ok github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/driver 7.161s
ok github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso 4.477s
ok github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor 8.391s
ok github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere 3.897s
ok github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template 4.728s
➜ packer-plugin-vsphere git:(fix/run-once-command-list)
Summary
Updates
RunOnceCommandList
to a slice of strings[]string
and updatesguiRunOnce()
to pass""
if no commands are provided. This will ensure that the function addresses each case.Testing
Basic:
Scenarios:
✅
run_once_command_list
not provided. ✅run_once_command_list []
used. ✅run_once_command_list [""]
used. ✅run_once_command_list ["command1", "command2"]
used.Reference
Closes #419