mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 00:32:09 -04:00
test: compile plugins on call to MakePluginDir
MakePluginDir used to only load plugins that were precompiled at the start of the tests, but now when invoked with any list of plugins, this will attempt to compile plugins one-by-one, so we don't need to modify the tests in several places when running tests. There's still value in compiling the plugins in advance though: as they run in parallel, they all get compiled at once, so we shave off a few seconds from the test run.
This commit is contained in:
parent
fc056a4594
commit
3d437ede99
1 changed files with 4 additions and 0 deletions
|
|
@ -149,6 +149,10 @@ func currentDir() (string, error) {
|
|||
func (ts *PackerTestSuite) MakePluginDir(pluginVersions ...string) (pluginTempDir string, cleanup func()) {
|
||||
t := ts.T()
|
||||
|
||||
for _, ver := range pluginVersions {
|
||||
BuildSimplePlugin(ver, t)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
defer func() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue