2016-06-23 02:55:29 +02:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2016-11-25 13:50:19 +01:00
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
2016-06-23 02:55:29 +02:00
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccAWSCloudWatchLogGroup_importBasic(t *testing.T) {
|
|
|
|
resourceName := "aws_cloudwatch_log_group.foobar"
|
2016-11-25 13:50:19 +01:00
|
|
|
rInt := acctest.RandInt()
|
2016-06-23 02:55:29 +02:00
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
2016-11-25 13:50:19 +01:00
|
|
|
Config: testAccAWSCloudWatchLogGroupConfig(rInt),
|
2016-06-23 02:55:29 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
ImportStateVerifyIgnore: []string{"retention_in_days"}, //this has a default value
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|