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
23de094a
Commit
23de094a
authored
Sep 08, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting/annotations): fixed broken test
parent
b8081b29
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
pkg/metrics/graphite_test.go
+2
-1
pkg/setting/setting.go
+6
-5
No files found.
pkg/metrics/graphite_test.go
View file @
23de094a
...
...
@@ -10,6 +10,8 @@ import (
func
TestGraphitePublisher
(
t
*
testing
.
T
)
{
setting
.
CustomInitPath
=
"conf/does_not_exist.ini"
Convey
(
"Test graphite prefix replacement"
,
t
,
func
()
{
var
err
error
err
=
setting
.
NewConfigContext
(
&
setting
.
CommandLineArgs
{
...
...
@@ -67,7 +69,6 @@ func TestGraphitePublisher(t *testing.T) {
_
,
err
=
setting
.
Cfg
.
NewSection
(
"metrics.graphite"
)
setting
.
InstanceName
=
"hostname.with.dots.com"
publisher
,
err
:=
CreateGraphitePublisher
()
So
(
err
,
ShouldBeNil
)
...
...
pkg/setting/setting.go
View file @
23de094a
...
...
@@ -47,10 +47,11 @@ var (
BuildStamp
int64
// Paths
LogsPath
string
HomePath
string
DataPath
string
PluginsPath
string
LogsPath
string
HomePath
string
DataPath
string
PluginsPath
string
CustomInitPath
=
"conf/custom.ini"
// Log settings.
LogModes
[]
string
...
...
@@ -312,7 +313,7 @@ func evalConfigValues() {
func
loadSpecifedConfigFile
(
configFile
string
)
error
{
if
configFile
==
""
{
configFile
=
filepath
.
Join
(
HomePath
,
"conf/custom.ini"
)
configFile
=
filepath
.
Join
(
HomePath
,
CustomInitPath
)
// return without error if custom file does not exist
if
!
pathExists
(
configFile
)
{
return
nil
...
...
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