Fix provisioner acc-test builder and provisioner store

This commit is contained in:
Moss 2020-04-06 16:14:14 +02:00 committed by Wilken Rivera
parent b183c5498f
commit 185deeeb38
4 changed files with 15 additions and 8 deletions

View File

@ -9,7 +9,8 @@ import (
"os"
"path/filepath"
"github.com/hashicorp/packer/command"
amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs"
"github.com/hashicorp/packer/packer"
testshelper "github.com/hashicorp/packer/helper/tests"
@ -55,6 +56,6 @@ func (s *AmazonEBSAccTest) CleanUp() error {
func (s *AmazonEBSAccTest) GetBuilderStore() packer.MapOfBuilder {
return packer.MapOfBuilder{
"amazon-ebs": func() (packer.Builder, error) { return command.Builders["amazon-ebs"], nil },
"amazon-ebs": func() (packer.Builder, error) { return &amazonebsbuilder.Builder{}, nil },
}
}

View File

@ -9,7 +9,8 @@ import (
"os"
"path/filepath"
"github.com/hashicorp/packer/command"
"github.com/hashicorp/packer/builder/virtualbox/iso"
"github.com/hashicorp/packer/packer"
testshelper "github.com/hashicorp/packer/helper/tests"
@ -40,6 +41,6 @@ func (v *VirtualBoxISOAccTest) CleanUp() error {
func (v *VirtualBoxISOAccTest) GetBuilderStore() packer.MapOfBuilder {
return packer.MapOfBuilder{
"virtualbox-iso": func() (packer.Builder, error) { return command.Builders["virtualbox-iso"], nil },
"virtualbox-iso": func() (packer.Builder, error) { return &iso.Builder{}, nil },
}
}

View File

@ -9,6 +9,8 @@ import (
"strings"
"testing"
"github.com/hashicorp/packer/provisioner/powershell"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/packer/command"
"github.com/hashicorp/packer/helper/tests/acc"
@ -57,7 +59,7 @@ func (s *PowershellProvisionerAccTest) GetConfig() (string, error) {
func (s *PowershellProvisionerAccTest) GetProvisionerStore() packer.MapOfProvisioner {
return packer.MapOfProvisioner{
"powershell": func() (packer.Provisioner, error) { return command.Provisioners["powershell"], nil },
"powershell": func() (packer.Provisioner, error) { return &powershell.Provisioner{}, nil },
}
}

View File

@ -3,13 +3,16 @@ package shell_test
import (
"bytes"
"fmt"
"github.com/hashicorp/packer/helper/tests/acc"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
"github.com/hashicorp/packer/helper/tests/acc"
"github.com/hashicorp/packer/provisioner/file"
"github.com/hashicorp/packer/provisioner/shell"
"github.com/hashicorp/packer/packer"
"github.com/hashicorp/go-uuid"
@ -45,8 +48,8 @@ func (s *ShellProvisionerAccTest) GetConfig() (string, error) {
func (s *ShellProvisionerAccTest) GetProvisionerStore() packer.MapOfProvisioner {
return packer.MapOfProvisioner{
"shell": func() (packer.Provisioner, error) { return command.Provisioners["shell"], nil },
"file": func() (packer.Provisioner, error) { return command.Provisioners["file"], nil },
"shell": func() (packer.Provisioner, error) { return &shell.Provisioner{}, nil },
"file": func() (packer.Provisioner, error) { return &file.Provisioner{}, nil },
}
}