Commit 9692955d by Vlad Ellis Committed by GitHub

Correct formatting of sqlstore_test.go

parent c208186f
...@@ -15,54 +15,54 @@ type sqlStoreTest struct { ...@@ -15,54 +15,54 @@ type sqlStoreTest struct {
connStrValues []string connStrValues []string
} }
var sqlStoreTestCases = []sqlStoreTest { var sqlStoreTestCases = []sqlStoreTest{
sqlStoreTest { {
name: "MySQL IPv4", name: "MySQL IPv4",
dbType: "mysql", dbType: "mysql",
dbHost: "1.2.3.4:5678", dbHost: "1.2.3.4:5678",
connStrValues: []string {"tcp(1.2.3.4:5678)"}, connStrValues: []string{"tcp(1.2.3.4:5678)"},
}, },
sqlStoreTest { {
name: "Postgres IPv4", name: "Postgres IPv4",
dbType: "postgres", dbType: "postgres",
dbHost: "1.2.3.4:5678", dbHost: "1.2.3.4:5678",
connStrValues: []string {"host=1.2.3.4", "port=5678"}, connStrValues: []string{"host=1.2.3.4", "port=5678"},
}, },
sqlStoreTest { {
name: "Postgres IPv4 (Default Port)", name: "Postgres IPv4 (Default Port)",
dbType: "postgres", dbType: "postgres",
dbHost: "1.2.3.4", dbHost: "1.2.3.4",
connStrValues: []string {"host=1.2.3.4", "port=5432"}, connStrValues: []string{"host=1.2.3.4", "port=5432"},
}, },
sqlStoreTest { {
name: "MySQL IPv4 (Default Port)", name: "MySQL IPv4 (Default Port)",
dbType: "mysql", dbType: "mysql",
dbHost: "1.2.3.4", dbHost: "1.2.3.4",
connStrValues: []string {"tcp(1.2.3.4)"}, connStrValues: []string{"tcp(1.2.3.4)"},
}, },
sqlStoreTest { {
name: "MySQL IPv6", name: "MySQL IPv6",
dbType: "mysql", dbType: "mysql",
dbHost: "[fe80::24e8:31b2:91df:b177]:1234", dbHost: "[fe80::24e8:31b2:91df:b177]:1234",
connStrValues: []string {"tcp([fe80::24e8:31b2:91df:b177]:1234)"}, connStrValues: []string{"tcp([fe80::24e8:31b2:91df:b177]:1234)"},
}, },
sqlStoreTest { {
name: "Postgres IPv6", name: "Postgres IPv6",
dbType: "postgres", dbType: "postgres",
dbHost: "[fe80::24e8:31b2:91df:b177]:1234", dbHost: "[fe80::24e8:31b2:91df:b177]:1234",
connStrValues: []string {"host=fe80::24e8:31b2:91df:b177", "port=1234"}, connStrValues: []string{"host=fe80::24e8:31b2:91df:b177", "port=1234"},
}, },
sqlStoreTest { {
name: "MySQL IPv6 (Default Port)", name: "MySQL IPv6 (Default Port)",
dbType: "mysql", dbType: "mysql",
dbHost: "::1", dbHost: "::1",
connStrValues: []string {"tcp(::1)"}, connStrValues: []string{"tcp(::1)"},
}, },
sqlStoreTest { {
name: "Postgres IPv6 (Default Port)", name: "Postgres IPv6 (Default Port)",
dbType: "postgres", dbType: "postgres",
dbHost: "::1", dbHost: "::1",
connStrValues: []string {"host=::1", "port=5432"}, connStrValues: []string{"host=::1", "port=5432"},
}, },
} }
...@@ -97,5 +97,5 @@ func makeSqlStoreTestConfig(dbType string, host string) *setting.Cfg { ...@@ -97,5 +97,5 @@ func makeSqlStoreTestConfig(dbType string, host string) *setting.Cfg {
sec.NewKey("name", "test_db") sec.NewKey("name", "test_db")
sec.NewKey("password", "pass") sec.NewKey("password", "pass")
return cfg; return cfg
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment