mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix sample.ini (#37106)
This commit is contained in:
parent
2f4c893cf3
commit
6b2d33dc14
@ -995,12 +995,12 @@
|
|||||||
[geomap]
|
[geomap]
|
||||||
# Set the JSON configuration for the default basemap
|
# Set the JSON configuration for the default basemap
|
||||||
;default_baselayer_config = `{
|
;default_baselayer_config = `{
|
||||||
"type": "xyz",
|
; "type": "xyz",
|
||||||
"config": {
|
; "config": {
|
||||||
"attribution": "Open street map",
|
; "attribution": "Open street map",
|
||||||
"url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
|
; "url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||||
}
|
; }
|
||||||
}`
|
;}`
|
||||||
|
|
||||||
# Enable or disable loading other base map layers
|
# Enable or disable loading other base map layers
|
||||||
;enable_custom_baselayers = true
|
;enable_custom_baselayers = true
|
||||||
|
@ -54,6 +54,16 @@ func TestLoadingSettings(t *testing.T) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Convey("sample.ini should load successfully", func() {
|
||||||
|
customInitPath := CustomInitPath
|
||||||
|
CustomInitPath = "conf/sample.ini"
|
||||||
|
cfg := NewCfg()
|
||||||
|
err := cfg.Load(&CommandLineArgs{HomePath: "../../"})
|
||||||
|
So(err, ShouldBeNil)
|
||||||
|
// Restore CustomInitPath to avoid side effects.
|
||||||
|
CustomInitPath = customInitPath
|
||||||
|
})
|
||||||
|
|
||||||
Convey("Should be able to override via environment variables", func() {
|
Convey("Should be able to override via environment variables", func() {
|
||||||
err := os.Setenv("GF_SECURITY_ADMIN_USER", "superduper")
|
err := os.Setenv("GF_SECURITY_ADMIN_USER", "superduper")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user