Building and testing your plugin
The GNUMakefile
scaffolding also includes simple test support. It would be wise to modify any test Packer templates to demonstrate every feature of your plugin fully. There is a helpful test
target to put the test templates and mock data through your plugin. When ready, you can simply run make test
and you will get an informative report of failures or issues:
$ make test ? packer-plugin-nspawn [no test files] ok packer-plugin-nspawn/builder/nspawn 0.047s ok packer-plugin-nspawn/datasource/nspawn 0.036s ? packer-plugin-nspawn/version [no test files]
Having this added to automation would also be a very wise move. A pre-commit hook can prevent broken code from being committed and also log one of these tests for compliance...