mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 00:32:09 -04:00
test: remove unnecessary testing.T arg
Since the MakePluginDir function takes the TestSuite as receiver, we don't need to additionally pass in a reference to testing.T, since the test suite already contains one instance, and offers a function to get it from.
This commit is contained in:
parent
99f3546e32
commit
c7e11f4bf2
2 changed files with 4 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
func (ts *PackerTestSuite) TestLoadingOrder() {
|
||||
t := ts.T()
|
||||
|
||||
pluginDir, cleanup := ts.MakePluginDir(t, "1.0.9", "1.0.10")
|
||||
pluginDir, cleanup := ts.MakePluginDir("1.0.9", "1.0.10")
|
||||
defer cleanup()
|
||||
|
||||
for _, command := range []string{"build", "validate"} {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,9 @@ func currentDir() (string, error) {
|
|||
// packer will be able to use that directory for running its functions.
|
||||
//
|
||||
// Deletion of the directory is the caller's responsibility.
|
||||
func (ts *PackerTestSuite) MakePluginDir(t *testing.T, pluginVersions ...string) (pluginTempDir string, cleanup func()) {
|
||||
func (ts *PackerTestSuite) MakePluginDir(pluginVersions ...string) (pluginTempDir string, cleanup func()) {
|
||||
t := ts.T()
|
||||
|
||||
var err error
|
||||
|
||||
defer func() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue