diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-08-08 23:39:46 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-08-09 22:07:58 +0100 |
commit | 030ff273473f0a5620ba276a370e5119f57179df (patch) | |
tree | 035f1d5f629a228f5d4a170583e92726dbefb604 /server/store/config_test.go | |
parent | 66a7d51577c83da7cc3cf385a188799fe885cd3a (diff) |
SQLite DB support
Diffstat (limited to 'server/store/config_test.go')
-rw-r--r-- | server/store/config_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/store/config_test.go b/server/store/config_test.go index 8e283f5..f262b57 100644 --- a/server/store/config_test.go +++ b/server/store/config_test.go @@ -11,15 +11,15 @@ import ( func TestMySQLConfig(t *testing.T) { var tests = []struct { in string - out string + out []string }{ - {"mysql:user:passwd:localhost", "user:passwd@tcp(localhost:3306)/certs?parseTime=true"}, - {"mysql:user:passwd:localhost:13306", "user:passwd@tcp(localhost:13306)/certs?parseTime=true"}, - {"mysql:root::localhost", "root@tcp(localhost:3306)/certs?parseTime=true"}, + {"mysql:user:passwd:localhost", []string{"mysql", "user:passwd@tcp(localhost:3306)/certs?parseTime=true"}}, + {"mysql:user:passwd:localhost:13306", []string{"mysql", "user:passwd@tcp(localhost:13306)/certs?parseTime=true"}}, + {"mysql:root::localhost", []string{"mysql", "root@tcp(localhost:3306)/certs?parseTime=true"}}, } for _, tt := range tests { - result := parseMySQLConfig(tt.in) - if result != tt.out { + result := parse(tt.in) + if !reflect.DeepEqual(result, tt.out) { t.Errorf("want %s, got %s", tt.out, result) } } |