mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-19 02:28:50 -05:00
The lib name for the common components for writing packer_test suites was not clear, and did not follow the convention established in Packer core and plugins. Therefore this commit does two things: first the lib is renamed into common as to follow this convention, and clearly document which components are common to all tests. Also checkers are placed in a subpackage of common, common/check, so that it is clearer what is meant to be used as checks for a command's execution status after it's been run, as part of Assert.
35 lines
575 B
Go
35 lines
575 B
Go
package plugin_tests
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/packer/packer_test/common"
|
|
"github.com/stretchr/testify/suite"
|
|
)
|
|
|
|
type PackerPluginTestSuite struct {
|
|
*common.PackerTestSuite
|
|
}
|
|
|
|
func Test_PackerPluginSuite(t *testing.T) {
|
|
baseSuite, cleanup := common.InitBaseSuite(t)
|
|
defer cleanup()
|
|
baseSuite.CompileTestPluginVersions(t,
|
|
"1.0.0",
|
|
"1.0.0+metadata",
|
|
"1.0.1-alpha1",
|
|
"1.0.9",
|
|
"1.0.10",
|
|
"1.0.0-dev",
|
|
"1.0.0-dev+metadata",
|
|
"1.0.10+metadata",
|
|
"1.0.1-dev",
|
|
"2.0.0",
|
|
)
|
|
|
|
ts := &PackerPluginTestSuite{
|
|
baseSuite,
|
|
}
|
|
|
|
suite.Run(t, ts)
|
|
}
|