packer/packer_test
Lucas Bajolet 36e43e30ee hcl2template: detect duplicate locals during parse
Previously duplicate detection for local variables happened during
`Initialise`, through a call to `checkForDuplicateLocalDefinition`.

This works in a majority of cases, but for commands like `console`, this
was not detected as the return diagnostics for `Initialise` are ignored.

That check can be done as early as during parsing however, as the names
of blocks are not dynamic in the slightest (no interpolation possible),
so we move that detection logic into `Parse`, so that the behaviour is
coherent between all commands.
2024-06-17 16:51:58 -04:00
..
plugin_tester build(deps): bump golang.org/x/net in /packer_test/plugin_tester 2024-06-12 11:55:32 -04:00
templates hcl2template: detect duplicate locals during parse 2024-06-17 16:51:58 -04:00
base_test.go packer_test: compile packer with .exe for Windows 2024-06-10 09:59:32 -04:00
commands_test.go packer_test: disable checkpoint for test cmds 2024-06-17 16:51:58 -04:00
gadgets_test.go packer_test: add convenience func for line count 2024-06-10 09:59:32 -04:00
init_test.go packer_test: add SkipNoAcc function 2024-06-17 16:51:58 -04:00
install_test.go packer_test: add SkipNoAcc function 2024-06-17 16:51:58 -04:00
loading_test.go packer_test: add test with config.json/components 2024-06-10 09:59:32 -04:00
local_eval_test.go hcl2template: detect duplicate locals during parse 2024-06-17 16:51:58 -04:00
pipe_checker_test.go packer_test: don't error on empty pipeline 2024-06-10 09:59:32 -04:00
plugin_test.go packer_test: remove %d from workdir path 2024-06-10 09:59:32 -04:00
plugins_remove_test.go packer_test: Add tests for invalid plugin remove use cases 2024-06-10 09:59:32 -04:00
sample_config.json packer_test: add test with config.json/components 2024-06-10 09:59:32 -04:00
suite_test.go packer_test: add SkipNoAcc function 2024-06-17 16:51:58 -04:00