hcl2template: fix invalid_inexplicit_source_2 test

The invalid_inexplicit_source_2 subtest for parse used to fail in
previous versions of Packer, but with the latest changes to plugin
source management, it won't, at least at parsing time, instead it fails
later when the Github getter (the only available for now) cannot get the
plugin binary from the source, as the source is not a valid Github URI.
concurrent-plugin-access
Lucas Bajolet 2 years ago committed by Lucas Bajolet
parent 00f39e72d3
commit 1bf3e86ee1

@ -644,13 +644,26 @@ func TestParser_no_init(t *testing.T) {
}{
VersionConstraints: nil,
RequiredPlugins: []*RequiredPlugins{
{},
{
RequiredPlugins: map[string]*RequiredPlugin{
"amazon": {
Name: "amazon",
Source: "hashicorp/amazon",
Type: &addrs.Plugin{
Source: "hashicorp/amazon",
},
Requirement: VersionConstraint{
Required: mustVersionConstraints(version.NewConstraint(">= v0")),
},
},
},
},
},
},
CorePackerVersionString: lockedVersion,
Basedir: filepath.Clean("testdata/init"),
},
true, true,
false, false,
[]packersdk.Build{},
false,
},

Loading…
Cancel
Save