Skip to content

Commit

Permalink
Remove amazon plugin from acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
nywilken committed Oct 24, 2023
1 parent ac71611 commit c65bb2f
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 254 deletions.
184 changes: 0 additions & 184 deletions acctest/plugin/bundled_plugin_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions acctest/plugin/component_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"os/exec"
"testing"

amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance"
"github.com/hashicorp/packer-plugin-sdk/acctest"
"github.com/hashicorp/packer/hcl2template/addrs"
)
Expand All @@ -32,13 +31,6 @@ func TestAccInitAndBuildBasicAmazonAmiDatasource(t *testing.T) {
Setup: func() error {
return cleanupPluginInstallation(plugin)
},
Teardown: func() error {
helper := amazonacc.AMIHelper{
Region: "us-west-2",
Name: "packer-amazon-ami-test",
}
return helper.CleanUpAmi()
},
Template: basicAmazonAmiDatasourceHCL2Template,
Type: "amazon-ami",
Init: true,
Expand Down
8 changes: 0 additions & 8 deletions acctest/plugin/plugin_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"regexp"
"testing"

amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance"
"github.com/hashicorp/packer-plugin-sdk/acctest"
"github.com/hashicorp/packer-plugin-sdk/acctest/testutils"
"github.com/hashicorp/packer/hcl2template/addrs"
Expand All @@ -36,13 +35,6 @@ func TestAccInitAndBuildBasicAmazonEbs(t *testing.T) {
Setup: func() error {
return cleanupPluginInstallation(plugin)
},
Teardown: func() error {
helper := amazonacc.AMIHelper{
Region: "us-east-1",
Name: "packer-plugin-amazon-ebs-test",
}
return helper.CleanUpAmi()
},
Template: basicAmazonEbsHCL2Template,
Type: "amazon-ebs",
Init: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packer {
required_plugins {
amazon = {
version = ">= 0.0.1"
version = "~>1"
source = "github.com/hashicorp/amazon"
}
}
Expand All @@ -25,6 +25,7 @@ source "amazon-ebs" "basic-example" {
communicator = "ssh"
instance_type = "t2.micro"
ssh_username = "ubuntu"
skip_create_ami = true
}

build {
Expand Down
15 changes: 8 additions & 7 deletions acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
packer {
required_plugins {
amazon = {
version = ">= 0.0.1"
source = "github.com/hashicorp/amazon"
version = "~> 1"
source = "github.com/hashicorp/amazon"
}
}
}

source "amazon-ebs" "basic-test" {
region = "us-east-1"
instance_type = "m3.medium"
source_ami = "ami-76b2a71e"
ssh_username = "ubuntu"
ami_name = "packer-plugin-amazon-ebs-test"
region = "us-east-1"
instance_type = "m3.medium"
source_ami = "ami-76b2a71e"
ssh_username = "ubuntu"
ami_name = "packer-plugin-amazon-ebs-test"
skip_create_ami = true
}

build {
Expand Down
10 changes: 0 additions & 10 deletions acctest/plugin/test-fixtures/basic_amazon_bundled.json

This file was deleted.

11 changes: 0 additions & 11 deletions acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl

This file was deleted.

This file was deleted.

7 changes: 2 additions & 5 deletions command/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"runtime"
"testing"

"github.com/hashicorp/packer-plugin-amazon/builder/ebs"
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
"github.com/hashicorp/packer/builder/file"
"github.com/hashicorp/packer/builder/null"
Expand Down Expand Up @@ -121,10 +120,8 @@ func getBareComponentFinder() packer.ComponentFinder {
return packer.ComponentFinder{
PluginConfig: &packer.PluginConfig{
Builders: packer.MapOfBuilder{
"file": func() (packersdk.Builder, error) { return &file.Builder{}, nil },
"null": func() (packersdk.Builder, error) { return &null.Builder{}, nil },
"amazon-ebs": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil },
"azure-arm": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil },
"file": func() (packersdk.Builder, error) { return &file.Builder{}, nil },
"null": func() (packersdk.Builder, error) { return &null.Builder{}, nil },
},
Provisioners: packer.MapOfProvisioner{
"shell-local": func() (packersdk.Provisioner, error) { return &shell_local.Provisioner{}, nil },
Expand Down

0 comments on commit c65bb2f

Please sign in to comment.