opentofu/builtin/providers/rabbitmq/import_vhost_test.go
Joe Topjian c2469c95f4 provider/rabbitmq: Initial Commit of RabbitMQ Provider
Contains provider configuration, a rabbitmq_vhost resource, and
acceptance test.
2016-09-01 03:19:16 +00:00

33 lines
658 B
Go

package rabbitmq
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccVhost_importBasic(t *testing.T) {
resourceName := "rabbitmq_vhost.test"
var vhost string
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccVhostCheckDestroy(vhost),
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccVhostConfig_basic,
Check: testAccVhostCheck(
resourceName, &vhost,
),
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}