From 7ef00c151a84d72b0f47bdce582c25da944cde15 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Sun, 16 Jul 2017 23:58:32 +0200 Subject: [PATCH] Keep TestAccGoogleSqlDatabase_basic as is, add TestAccGoogleSqlDatabase_update. --- google/resource_sql_database_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/google/resource_sql_database_test.go b/google/resource_sql_database_test.go index 5afe5030411..8e2ac6d176d 100644 --- a/google/resource_sql_database_test.go +++ b/google/resource_sql_database_test.go @@ -14,6 +14,28 @@ import ( func TestAccGoogleSqlDatabase_basic(t *testing.T) { var database sqladmin.Database + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccGoogleSqlDatabaseInstanceDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: fmt.Sprintf( + testGoogleSqlDatabase_basic, acctest.RandString(10), acctest.RandString(10)), + Check: resource.ComposeTestCheckFunc( + testAccCheckGoogleSqlDatabaseExists( + "google_sql_database.database", &database), + testAccCheckGoogleSqlDatabaseEquals( + "google_sql_database.database", &database), + ), + }, + }, + }) +} + +func TestAccGoogleSqlDatabase_update(t *testing.T) { + var database sqladmin.Database + instance_name := acctest.RandString(10) database_name := acctest.RandString(10)