Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
9692955d
Unverified
Commit
9692955d
authored
Jan 27, 2019
by
Vlad Ellis
Committed by
GitHub
Jan 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct formatting of sqlstore_test.go
parent
c208186f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
pkg/services/sqlstore/sqlstore_test.go
+18
-18
No files found.
pkg/services/sqlstore/sqlstore_test.go
View file @
9692955d
...
@@ -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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment