github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/rancher/import_rancher_registry_credential_test.go (about)

     1  package rancher
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/resource"
     7  )
     8  
     9  func TestAccRancherRegistryCredential_importBasic(t *testing.T) {
    10  	resourceName := "rancher_registry_credential.foo"
    11  
    12  	resource.Test(t, resource.TestCase{
    13  		PreCheck:     func() { testAccPreCheck(t) },
    14  		Providers:    testAccProviders,
    15  		CheckDestroy: testAccCheckRancherRegistryCredentialDestroy,
    16  		Steps: []resource.TestStep{
    17  			resource.TestStep{
    18  				Config: testAccRancherRegistryCredentialConfig,
    19  			},
    20  
    21  			resource.TestStep{
    22  				ResourceName:      resourceName,
    23  				ImportState:       true,
    24  				ImportStateVerify: true,
    25  				ImportStateVerifyIgnore: []string{
    26  					"secret_value"},
    27  			},
    28  		},
    29  	})
    30  }