github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/aws/import_aws_dynamodb_table_test.go (about)

     1  package aws
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/resource"
     7  )
     8  
     9  func TestAccAWSDynamoDbTable_importBasic(t *testing.T) {
    10  	resourceName := "aws_dynamodb_table.basic-dynamodb-table"
    11  
    12  	resource.Test(t, resource.TestCase{
    13  		PreCheck:     func() { testAccPreCheck(t) },
    14  		Providers:    testAccProviders,
    15  		CheckDestroy: testAccCheckAWSDynamoDbTableDestroy,
    16  		Steps: []resource.TestStep{
    17  			{
    18  				Config: testAccAWSDynamoDbConfigInitialState(),
    19  			},
    20  
    21  			{
    22  				ResourceName:      resourceName,
    23  				ImportState:       true,
    24  				ImportStateVerify: true,
    25  			},
    26  		},
    27  	})
    28  }
    29  
    30  func TestAccAWSDynamoDbTable_importTags(t *testing.T) {
    31  	resourceName := "aws_dynamodb_table.basic-dynamodb-table"
    32  
    33  	resource.Test(t, resource.TestCase{
    34  		PreCheck:     func() { testAccPreCheck(t) },
    35  		Providers:    testAccProviders,
    36  		CheckDestroy: testAccCheckAWSDynamoDbTableDestroy,
    37  		Steps: []resource.TestStep{
    38  			{
    39  				Config: testAccAWSDynamoDbConfigTags(),
    40  			},
    41  
    42  			{
    43  				ResourceName:      resourceName,
    44  				ImportState:       true,
    45  				ImportStateVerify: true,
    46  			},
    47  		},
    48  	})
    49  }