Skip to content

Commit 6a54e51

Browse files
authored
chore: remove unused code (#201)
Signed-off-by: Rui Chen <rui@chenrui.dev>
1 parent d82f3d4 commit 6a54e51

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

mysql/resource_grant.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ import (
1919

2020
type ObjectT string
2121

22-
var (
23-
kProcedure ObjectT = "PROCEDURE"
24-
kFunction ObjectT = "FUNCTION"
25-
kTable ObjectT = "TABLE"
26-
)
27-
2822
var grantCreateMutex = NewKeyedMutex()
2923

3024
type MySQLGrant interface {

mysql/resource_grant_test.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -440,16 +440,6 @@ func prepareTable(dbname string, tableName string) resource.TestCheckFunc {
440440
}
441441
}
442442

443-
func testResourceNotDefined(rn string) resource.TestCheckFunc {
444-
return func(s *terraform.State) error {
445-
_, ok := s.RootModule().Resources[rn]
446-
if ok {
447-
return fmt.Errorf("resource found, but not expected: %s", rn)
448-
}
449-
return nil
450-
}
451-
}
452-
453443
// Test privilege - one can condition it exists or that it doesn't exist.
454444
func testAccPrivilege(rn string, privilege string, expectExists bool, expectGrant bool) resource.TestCheckFunc {
455445
return func(s *terraform.State) error {
@@ -667,27 +657,6 @@ resource "mysql_grant" "test" {
667657
`, dbName, dbName)
668658
}
669659

670-
func testAccGrantConfigBasicWithGrant(dbName string) string {
671-
return fmt.Sprintf(`
672-
resource "mysql_database" "test" {
673-
name = "%s"
674-
}
675-
676-
resource "mysql_user" "test" {
677-
user = "jdoe-%s"
678-
host = "example.com"
679-
}
680-
681-
resource "mysql_grant" "test" {
682-
user = "${mysql_user.test.user}"
683-
host = "${mysql_user.test.host}"
684-
database = "${mysql_database.test.name}"
685-
privileges = ["UPDATE", "SELECT"]
686-
grant = "true"
687-
}
688-
`, dbName, dbName)
689-
}
690-
691660
func testAccGrantConfigExtraHost(dbName string, extraHost bool) string {
692661
extra := ""
693662
if extraHost {

0 commit comments

Comments
 (0)