summaryrefslogtreecommitdiffstats
path: root/hugolib/config_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-08 09:48:22 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-06-08 09:57:18 +0200
commit12530519d8fb4513c9c18a6494099b7dff8e4fd4 (patch)
treef116049dd09208351b645f738083ce590b46577e /hugolib/config_test.go
parentf55d2f43769053b80b419a690554e747dc5dcede (diff)
Fix nested OS env config override when parent does not exist
Fixes #8618
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r--hugolib/config_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index 9e01212c7..fb81c927e 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -530,11 +530,14 @@ theme_param="themevalue2"
"HUGOxPARAMSxMYTHEME_SECTION2xTHEME_PARAM", "themevalue2_changed",
"HUGO_PARAMS_EMPTY", ``,
"HUGO_PARAMS_HTML", `<a target="_blank" />`,
+ //
+ "HUGO_SERVICES_GOOGLEANALYTICS_ID", `gaid`,
)
b.Build(BuildCfg{})
cfg := b.H.Cfg
+ scfg := b.H.Sites[0].siteConfigConfig.Services
c.Assert(cfg.Get("environment"), qt.Equals, "test")
c.Assert(cfg.GetBool("enablegitinfo"), qt.Equals, false)
@@ -551,4 +554,6 @@ theme_param="themevalue2"
c.Assert(cfg.Get("params.mytheme_section2.theme_param"), qt.Equals, "themevalue2_changed")
c.Assert(cfg.Get("params.empty"), qt.Equals, ``)
c.Assert(cfg.Get("params.html"), qt.Equals, `<a target="_blank" />`)
+
+ c.Assert(scfg.GoogleAnalytics.ID, qt.Equals, "gaid")
}