Settings: Remove unnessary error handling code (#27420)
* Settings: Remove unnecessary error handling code Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
6fabfee097
commit
5c31f07904
@@ -279,14 +279,12 @@ func TestLoadingSettings(t *testing.T) {
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
Convey("If key is found - should return value from ini file", func() {
|
||||
value, err := valueAsString(iniFile.Section("server"), "alt_url", "")
|
||||
So(err, ShouldBeNil)
|
||||
value := valueAsString(iniFile.Section("server"), "alt_url", "")
|
||||
So(value, ShouldEqual, "https://grafana.com/")
|
||||
})
|
||||
|
||||
Convey("If key is not found - should return default value", func() {
|
||||
value, err := valueAsString(iniFile.Section("server"), "extra_url", "default_url_val")
|
||||
So(err, ShouldBeNil)
|
||||
value := valueAsString(iniFile.Section("server"), "extra_url", "default_url_val")
|
||||
So(value, ShouldEqual, "default_url_val")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user