2019-03-06 15:08:13 -05:00
|
|
|
//TODO: explain how to delete the image.
|
2019-02-11 17:43:16 -05:00
|
|
|
package bsu
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
builderT "github.com/hashicorp/packer/helper/builder/testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestBuilderAcc_basic(t *testing.T) {
|
|
|
|
builderT.Test(t, builderT.TestCase{
|
2019-03-06 15:08:13 -05:00
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Builder: &Builder{},
|
|
|
|
Template: testBuilderAccBasic,
|
|
|
|
SkipArtifactTeardown: true,
|
2019-02-11 17:43:16 -05:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
func testAccPreCheck(t *testing.T) {
|
|
|
|
}
|
|
|
|
|
|
|
|
const testBuilderAccBasic = `
|
|
|
|
{
|
|
|
|
"builders": [{
|
|
|
|
"type": "test",
|
|
|
|
"region": "eu-west-2",
|
2019-03-05 14:31:28 -05:00
|
|
|
"vm_type": "t2.micro",
|
2020-08-13 18:03:32 -04:00
|
|
|
"source_omi": "ami-abe953fa",
|
2019-03-05 14:31:28 -05:00
|
|
|
"ssh_username": "outscale",
|
2020-09-30 11:37:41 -04:00
|
|
|
"omi_name": "packer-test",
|
2020-08-21 14:30:21 -04:00
|
|
|
"associate_public_ip_address": true,
|
|
|
|
"force_deregister": true
|
2019-02-11 17:43:16 -05:00
|
|
|
}]
|
|
|
|
}
|
|
|
|
`
|