mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-24 16:54:09 -04:00
test: add test for loading plugins with wd plugin
Add one more test to ensure we don't load plugins with the old naming convention in the workdir for a packer run.
This commit is contained in:
@@ -62,6 +62,17 @@ func (ts *PackerTestSuite) TestLoadWithLegacyPluginName() {
|
||||
SetArgs("build", "templates/simple.pkr.hcl").
|
||||
Assert(ts.T(), MustSucceed(), Grep("packer-plugin-tester_v1\\.0\\.0[^\\n]+ plugin:", grepStderr))
|
||||
})
|
||||
|
||||
wd, cleanup := TempWorkdir(ts.T(), "./templates/simple.pkr.hcl")
|
||||
defer cleanup()
|
||||
|
||||
CopyFile(ts.T(), filepath.Join(wd, "packer-plugin-tester"), plugin)
|
||||
|
||||
ts.Run("multiple plugins installed: 1.0.0 in plugin dir with sum, one in workdir (no version). Should load 1.0.0", func() {
|
||||
ts.PackerCommand().UsePluginDir(pluginDir).SetWD(wd).
|
||||
SetArgs("build", "simple.pkr.hcl").
|
||||
Assert(ts.T(), MustSucceed(), Grep("packer-plugin-tester_v1\\.0\\.0[^\\n]+ plugin:", grepStderr))
|
||||
})
|
||||
}
|
||||
|
||||
func (ts *PackerTestSuite) TestLoadWithSHAMismatches() {
|
||||
|
||||
Reference in New Issue
Block a user