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

Remove database config. Not needed.

parent 4c123c18
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@ type Config struct {
Server Server `mapstructure:"server"`
Auth Auth `mapstructure:"auth"`
SSH SSH `mapstructure:"ssh"`
Database Database `mapstructure:"database"`
}
// Server holds the configuration specific to the web server and sessions.
......@@ -23,15 +22,6 @@ type Server struct {
CookieSecret string `mapstructure:"cookie_secret"`
}
// Database holds the configuration specific to database functions.
type Database struct {
DbType string `mapstructure:"dbtype"`
Host string `mapstructure:"host"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
DB string `mapstructure:"db"`
}
// Auth holds the configuration specific to the OAuth provider.
type Auth struct {
OauthClientID string `mapstructure:"oauth_client_id"`
......
......@@ -57,18 +57,3 @@ func TestSSHConfig(t *testing.T) {
}
a.Equal(d.Hours(), float64(720))
}
func TestDatabaseConfig(t *testing.T) {
a := assert.New(t)
c, err := ReadConfig(bytes.NewBuffer(testdata.Database))
if err != nil {
t.Fatal(err)
}
d := c.Database
a.IsType(d, Database{})
a.Equal(d.User, "user")
a.Equal(d.Password, "password")
a.Equal(d.Host, "localhost")
a.Equal(d.DbType, "mongo")
a.Equal(d.DB, "dbname")
}
......@@ -30,13 +30,3 @@ var SSHConfig = []byte(`{
"permissions": ["permit-pty", "permit-X11-forwarding", "permit-port-forwarding", "permit-user-rc"]
}
}`)
var Database = []byte(`{
"database": {
"host": "localhost",
"user": "user",
"password": "password",
"db": "dbname",
"dbtype": "mongo"
}
}`)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment