From 6e21cd746e56ca2f52864cc0e7745daa655784d9 Mon Sep 17 00:00:00 2001 From: stack72 Date: Tue, 10 Nov 2015 17:35:12 +0000 Subject: [PATCH] Removing the AWS DBInstance Acceptance Test for withoutEngine as this is now part of the checkInstanceAttributes func --- .../aws/resource_aws_db_instance_test.go | 45 +------------------ 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/builtin/providers/aws/resource_aws_db_instance_test.go b/builtin/providers/aws/resource_aws_db_instance_test.go index d58f33ed7..a2c2f69ca 100644 --- a/builtin/providers/aws/resource_aws_db_instance_test.go +++ b/builtin/providers/aws/resource_aws_db_instance_test.go @@ -31,8 +31,6 @@ func TestAccAWSDBInstance_basic(t *testing.T) { "aws_db_instance.bar", "allocated_storage", "10"), resource.TestCheckResourceAttr( "aws_db_instance.bar", "engine", "mysql"), - resource.TestCheckResourceAttr( - "aws_db_instance.bar", "engine_version", "5.6.21"), resource.TestCheckResourceAttr( "aws_db_instance.bar", "license_model", "general-public-license"), resource.TestCheckResourceAttr( @@ -49,25 +47,6 @@ func TestAccAWSDBInstance_basic(t *testing.T) { }) } -func TestAccAWSDBInstance_withoutEngineVersion(t *testing.T) { - var v rds.DBInstance - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckAWSDBInstanceDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: testAccAWSDBInstanceConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckAWSDBInstanceExists("aws_db_instance.bar", &v), - testAccCheckAWSDBInstanceAttributes(&v), - ), - }, - }, - }) -} - func TestAccAWSDBInstanceReplica(t *testing.T) { var s, r rds.DBInstance @@ -130,7 +109,7 @@ func testAccCheckAWSDBInstanceAttributes(v *rds.DBInstance) resource.TestCheckFu return fmt.Errorf("bad engine: %#v", *v.Engine) } - if *v.EngineVersion != "5.6.21" { + if *v.EngineVersion == "" { return fmt.Errorf("bad engine_version: %#v", *v.EngineVersion) } @@ -213,28 +192,6 @@ resource "aws_db_instance" "bar" { parameter_group_name = "default.mysql5.6" }`, rand.New(rand.NewSource(time.Now().UnixNano())).Int()) -var testAccAWSDBInstanceConfig_withoutEngineVersion = fmt.Sprintf(` -resource "aws_db_instance" "bar" { - identifier = "foobarbaz-test-terraform-%d" - - allocated_storage = 10 - engine = "MySQL" - instance_class = "db.t1.micro" - name = "baz" - password = "barbarbarbar" - username = "foo" - - - # Maintenance Window is stored in lower case in the API, though not strictly - # documented. Terraform will downcase this to match (as opposed to throw a - # validation error). - maintenance_window = "Fri:09:00-Fri:09:30" - - backup_retention_period = 0 - - parameter_group_name = "default.mysql5.6" -}`, rand.New(rand.NewSource(time.Now().UnixNano())).Int()) - func testAccReplicaInstanceConfig(val int) string { return fmt.Sprintf(` resource "aws_db_instance" "bar" {