packer_test: amend installation with meta test

The installation with a metadata part in the version for a plugin had
one test that relied on the plugin directories being populated with
packer plugins install --path.
This could change in the future, while the command should remain
functional, so we explicitely call it in the test instead of through the
function that creates/populates a temp plugin dir.
pull/13032/head
Lucas Bajolet 2 years ago committed by Lucas Bajolet
parent 3661d97fc0
commit 51cdd9c4a9

@ -1,9 +1,15 @@
package packer_test
func (ts *PackerTestSuite) TestInstallPluginWithMetadata() {
tempPluginDir, cleanup := ts.MakePluginDir("1.0.0+metadata")
tempPluginDir, cleanup := ts.MakePluginDir()
defer cleanup()
ts.Run("install plugin with metadata in version", func() {
ts.PackerCommand().UsePluginDir(tempPluginDir).
SetArgs("plugins", "install", "--path", BuildSimplePlugin("1.0.0+metadata", ts.T()), "github.com/hashicorp/tester").
Assert(MustSucceed(), Grep("Successfully installed plugin", grepStdout))
})
ts.Run("metadata plugin installed must not have metadata in its path", func() {
ts.PackerCommand().UsePluginDir(tempPluginDir).
SetArgs("plugins", "installed").

Loading…
Cancel
Save