terraform/builtin/providers/opc/import_ip_reservation_test.go

35 lines
679 B
Go

package opc
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccOPCIPReservation_importBasic(t *testing.T) {
resourceName := "opc_compute_ip_reservation.test"
ri := acctest.RandInt()
config := fmt.Sprintf(testAccIPReservationBasic, ri)
resource.Test(t, resource.TestCase{
PreCheck: func() {
testAccPreCheck(t)
},
Providers: testAccProviders,
CheckDestroy: testAccCheckIPReservationDestroy,
Steps: []resource.TestStep{
{
Config: config,
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}