Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cashier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
cashier
Commits
f2ac0d97
Commit
f2ac0d97
authored
9 years ago
by
Niall Sheridan
Browse files
Options
Downloads
Patches
Plain Diff
Remove database config. Not needed.
parent
4c123c18
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
server/config/config.go
+3
-13
3 additions, 13 deletions
server/config/config.go
server/config/config_test.go
+0
-15
0 additions, 15 deletions
server/config/config_test.go
testdata/config.go
+0
-10
0 additions, 10 deletions
testdata/config.go
with
3 additions
and
38 deletions
server/config/config.go
+
3
−
13
View file @
f2ac0d97
...
...
@@ -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"`
...
...
This diff is collapsed.
Click to expand it.
server/config/config_test.go
+
0
−
15
View file @
f2ac0d97
...
...
@@ -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"
)
}
This diff is collapsed.
Click to expand it.
testdata/config.go
+
0
−
10
View file @
f2ac0d97
...
...
@@ -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"
}
}`
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment