// Code generated by generators/resource/main.go; DO NOT EDIT.

package ecr_test

import (
	"testing"

	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
	"github.com/hashicorp/terraform-provider-awscc/internal/acctest"
)

func TestAccAWSECRPullThroughCacheRule_basic(t *testing.T) {
	td := acctest.NewTestData(t, "AWS::ECR::PullThroughCacheRule", "awscc_ecr_pull_through_cache_rule", "test")

	td.ResourceTest(t, []resource.TestStep{
		{
			Config: td.EmptyConfig(),
			Check: resource.ComposeTestCheckFunc(
				td.CheckExistsInAWS(),
			),
		},
		{
			ResourceName:      td.ResourceName,
			ImportState:       true,
			ImportStateVerify: true,
		},
	})
}

func TestAccAWSECRPullThroughCacheRule_disappears(t *testing.T) {
	td := acctest.NewTestData(t, "AWS::ECR::PullThroughCacheRule", "awscc_ecr_pull_through_cache_rule", "test")

	td.ResourceTest(t, []resource.TestStep{
		{
			Config: td.EmptyConfig(),
			Check: resource.ComposeTestCheckFunc(
				td.CheckExistsInAWS(),
				td.DeleteResource(),
			),
			ExpectNonEmptyPlan: true,
		},
	})
}