From becf7723e6b228babb8e27eeb5c385a2567a417d Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 3 Dec 2020 11:46:58 -0800 Subject: [PATCH] move builder/testing to acctest inside sdk --- builder/alicloud/ecs/builder_acc_test.go | 2 +- builder/amazon/ebs/builder_acc_test.go | 2 +- builder/amazon/ebs/tags_acc_test.go | 2 +- builder/azure/arm/builder_acc_test.go | 2 +- builder/azure/dtl/builder_acc_test.go | 2 +- builder/digitalocean/builder_acc_test.go | 2 +- builder/file/builder_test.go | 2 +- builder/hcloud/builder_acc_test.go | 2 +- builder/hyperone/builder_acc_test.go | 2 +- builder/linode/builder_acc_test.go | 2 +- builder/oneandone/builder_acc_test.go | 2 +- builder/osc/bsu/builder_acc_test.go | 2 +- builder/osc/bsusurrogate/builder_acc_test.go | 2 +- builder/osc/bsuvolume/builder_acc_test.go | 2 +- builder/profitbricks/builder_acc_test.go | 2 +- builder/ucloud/uhost/builder_acc_test.go | 2 +- builder/virtualbox/iso/builder_acc_test.go | 2 +- builder/vmware/iso/builder_acc_test.go | 2 +- builder/vmware/iso/step_create_vmx_test.go | 2 +- builder/vsphere/clone/builder_acc_test.go | 2 +- builder/vsphere/iso/builder_acc_test.go | 2 +- builder/yandex/builder_acc_test.go | 2 +- packer-plugin-sdk/{builder/testing => acctest}/testing.go | 2 +- packer-plugin-sdk/{builder/testing => acctest}/testing_test.go | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) rename packer-plugin-sdk/{builder/testing => acctest}/testing.go (99%) rename packer-plugin-sdk/{builder/testing => acctest}/testing_test.go (98%) diff --git a/builder/alicloud/ecs/builder_acc_test.go b/builder/alicloud/ecs/builder_acc_test.go index c3efa2129..31a416eb1 100644 --- a/builder/alicloud/ecs/builder_acc_test.go +++ b/builder/alicloud/ecs/builder_acc_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" ) diff --git a/builder/amazon/ebs/builder_acc_test.go b/builder/amazon/ebs/builder_acc_test.go index e81d226ab..b2f84683e 100644 --- a/builder/amazon/ebs/builder_acc_test.go +++ b/builder/amazon/ebs/builder_acc_test.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/packer/builder/amazon/common" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" ) diff --git a/builder/amazon/ebs/tags_acc_test.go b/builder/amazon/ebs/tags_acc_test.go index 640e27cc4..933b73ce1 100644 --- a/builder/amazon/ebs/tags_acc_test.go +++ b/builder/amazon/ebs/tags_acc_test.go @@ -8,7 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/packer/builder/amazon/common" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" ) diff --git a/builder/azure/arm/builder_acc_test.go b/builder/azure/arm/builder_acc_test.go index 24a36bf72..dc7b2fc00 100644 --- a/builder/azure/arm/builder_acc_test.go +++ b/builder/azure/arm/builder_acc_test.go @@ -25,7 +25,7 @@ import ( "fmt" "os" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) const DeviceLoginAcceptanceTest = "DEVICELOGIN_TEST" diff --git a/builder/azure/dtl/builder_acc_test.go b/builder/azure/dtl/builder_acc_test.go index 825090890..218d9910d 100644 --- a/builder/azure/dtl/builder_acc_test.go +++ b/builder/azure/dtl/builder_acc_test.go @@ -28,7 +28,7 @@ package dtl import ( "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) const DeviceLoginAcceptanceTest = "DEVICELOGIN_TEST" diff --git a/builder/digitalocean/builder_acc_test.go b/builder/digitalocean/builder_acc_test.go index 619736ab6..4273def7c 100644 --- a/builder/digitalocean/builder_acc_test.go +++ b/builder/digitalocean/builder_acc_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/digitalocean/godo" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" "golang.org/x/oauth2" ) diff --git a/builder/file/builder_test.go b/builder/file/builder_test.go index edaab32f5..b72e8a2b6 100644 --- a/builder/file/builder_test.go +++ b/builder/file/builder_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" ) diff --git a/builder/hcloud/builder_acc_test.go b/builder/hcloud/builder_acc_test.go index 51e833d10..7c5ee1e85 100644 --- a/builder/hcloud/builder_acc_test.go +++ b/builder/hcloud/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/hyperone/builder_acc_test.go b/builder/hyperone/builder_acc_test.go index aa295b618..625309f37 100644 --- a/builder/hyperone/builder_acc_test.go +++ b/builder/hyperone/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/linode/builder_acc_test.go b/builder/linode/builder_acc_test.go index bd5af8fb8..19a74ccad 100644 --- a/builder/linode/builder_acc_test.go +++ b/builder/linode/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/oneandone/builder_acc_test.go b/builder/oneandone/builder_acc_test.go index b348f805d..b3811e2b9 100644 --- a/builder/oneandone/builder_acc_test.go +++ b/builder/oneandone/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/osc/bsu/builder_acc_test.go b/builder/osc/bsu/builder_acc_test.go index 7d5e25f59..bc25e445b 100644 --- a/builder/osc/bsu/builder_acc_test.go +++ b/builder/osc/bsu/builder_acc_test.go @@ -4,7 +4,7 @@ package bsu import ( "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/osc/bsusurrogate/builder_acc_test.go b/builder/osc/bsusurrogate/builder_acc_test.go index b8a980a0c..bda5366e0 100644 --- a/builder/osc/bsusurrogate/builder_acc_test.go +++ b/builder/osc/bsusurrogate/builder_acc_test.go @@ -3,7 +3,7 @@ package bsusurrogate import ( "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/osc/bsuvolume/builder_acc_test.go b/builder/osc/bsuvolume/builder_acc_test.go index dd3bbef6a..e0046c706 100644 --- a/builder/osc/bsuvolume/builder_acc_test.go +++ b/builder/osc/bsuvolume/builder_acc_test.go @@ -4,7 +4,7 @@ package bsuvolume import ( "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/profitbricks/builder_acc_test.go b/builder/profitbricks/builder_acc_test.go index c3a829920..ce22fa877 100644 --- a/builder/profitbricks/builder_acc_test.go +++ b/builder/profitbricks/builder_acc_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/ucloud/uhost/builder_acc_test.go b/builder/ucloud/uhost/builder_acc_test.go index 5d3c68888..264875f60 100644 --- a/builder/ucloud/uhost/builder_acc_test.go +++ b/builder/ucloud/uhost/builder_acc_test.go @@ -9,7 +9,7 @@ import ( packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" "github.com/stretchr/testify/assert" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_validateRegion(t *testing.T) { diff --git a/builder/virtualbox/iso/builder_acc_test.go b/builder/virtualbox/iso/builder_acc_test.go index 1be8de534..10f80e6db 100644 --- a/builder/virtualbox/iso/builder_acc_test.go +++ b/builder/virtualbox/iso/builder_acc_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/vmware/iso/builder_acc_test.go b/builder/vmware/iso/builder_acc_test.go index 1be8de534..10f80e6db 100644 --- a/builder/vmware/iso/builder_acc_test.go +++ b/builder/vmware/iso/builder_acc_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) func TestBuilderAcc_basic(t *testing.T) { diff --git a/builder/vmware/iso/step_create_vmx_test.go b/builder/vmware/iso/step_create_vmx_test.go index a9c58caa2..051a49dc7 100644 --- a/builder/vmware/iso/step_create_vmx_test.go +++ b/builder/vmware/iso/step_create_vmx_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" "github.com/hashicorp/packer/packer-plugin-sdk/tmp" ) diff --git a/builder/vsphere/clone/builder_acc_test.go b/builder/vsphere/clone/builder_acc_test.go index 83d34ae8f..dfdd9ecb9 100644 --- a/builder/vsphere/clone/builder_acc_test.go +++ b/builder/vsphere/clone/builder_acc_test.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/packer/builder/vsphere/common" commonT "github.com/hashicorp/packer/builder/vsphere/common/testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" "github.com/vmware/govmomi/vim25/types" ) diff --git a/builder/vsphere/iso/builder_acc_test.go b/builder/vsphere/iso/builder_acc_test.go index 1ded0723b..939a2f407 100644 --- a/builder/vsphere/iso/builder_acc_test.go +++ b/builder/vsphere/iso/builder_acc_test.go @@ -7,7 +7,7 @@ import ( "testing" commonT "github.com/hashicorp/packer/builder/vsphere/common/testing" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" packersdk "github.com/hashicorp/packer/packer-plugin-sdk/packer" "github.com/vmware/govmomi/vim25/types" ) diff --git a/builder/yandex/builder_acc_test.go b/builder/yandex/builder_acc_test.go index 3d201a171..3e99bc33f 100644 --- a/builder/yandex/builder_acc_test.go +++ b/builder/yandex/builder_acc_test.go @@ -7,7 +7,7 @@ import ( "github.com/go-resty/resty/v2" - builderT "github.com/hashicorp/packer/packer-plugin-sdk/builder/testing" + builderT "github.com/hashicorp/packer/packer-plugin-sdk/acctest" ) const InstanceMetadataAddr = "169.254.169.254" diff --git a/packer-plugin-sdk/builder/testing/testing.go b/packer-plugin-sdk/acctest/testing.go similarity index 99% rename from packer-plugin-sdk/builder/testing/testing.go rename to packer-plugin-sdk/acctest/testing.go index 3fbe5304a..cd2a69782 100644 --- a/packer-plugin-sdk/builder/testing/testing.go +++ b/packer-plugin-sdk/acctest/testing.go @@ -1,4 +1,4 @@ -package testing +package acctest import ( "context" diff --git a/packer-plugin-sdk/builder/testing/testing_test.go b/packer-plugin-sdk/acctest/testing_test.go similarity index 98% rename from packer-plugin-sdk/builder/testing/testing_test.go rename to packer-plugin-sdk/acctest/testing_test.go index 347bde639..ca2240470 100644 --- a/packer-plugin-sdk/builder/testing/testing_test.go +++ b/packer-plugin-sdk/acctest/testing_test.go @@ -1,4 +1,4 @@ -package testing +package acctest import ( "os"