Skip to content
Snippets Groups Projects
Commit 4993eae2 authored by Niall Sheridan's avatar Niall Sheridan
Browse files

Remove DatastoreConversion test

It's going away
parent 10dfd241
Branches
Tags
No related merge requests found
...@@ -58,30 +58,3 @@ func TestConfigVerify(t *testing.T) { ...@@ -58,30 +58,3 @@ func TestConfigVerify(t *testing.T) {
_, err := ReadConfig("testdata/empty.config") _, err := ReadConfig("testdata/empty.config")
assert.Contains(t, err.Error(), "missing ssh config section", "missing server config section", "missing auth config section") assert.Contains(t, err.Error(), "missing ssh config section", "missing server config section", "missing auth config section")
} }
func TestDatastoreConversion(t *testing.T) {
tests := []struct {
in string
out Database
}{
{
"mysql:user:passwd:localhost:3306", Database{"type": "mysql", "username": "user", "password": "passwd", "address": "localhost:3306"},
},
{
"mem", Database{"type": "mem"},
},
{
"sqlite:/data/certs.db", Database{"type": "sqlite", "filename": "/data/certs.db"},
},
}
for _, tc := range tests {
config := &Config{
Server: &Server{
Datastore: tc.in,
},
}
convertDatastoreConfig(config)
assert.EqualValues(t, config.Server.Database, tc.out)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment