aboutsummaryrefslogtreecommitdiffhomepage
path: root/cache/filecache
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-03-21 09:35:15 +0100
committerBjørn Erik Pedersen <[email protected]>2022-04-08 13:26:17 +0200
commitd070bdf10f14d233288f7318a4e9f7555f070a65 (patch)
treefff8d59f98bdab3027bb45c4e10ca88594332872 /cache/filecache
parentb08193971a821fc27e549a73120c15e5e5186775 (diff)
downloadhugo-d070bdf10f14d233288f7318a4e9f7555f070a65.tar.gz
hugo-d070bdf10f14d233288f7318a4e9f7555f070a65.zip
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
Diffstat (limited to 'cache/filecache')
-rw-r--r--cache/filecache/filecache_config_test.go2
-rw-r--r--cache/filecache/filecache_test.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/cache/filecache/filecache_config_test.go b/cache/filecache/filecache_config_test.go
index 1ff3b8112..1ed020ef1 100644
--- a/cache/filecache/filecache_config_test.go
+++ b/cache/filecache/filecache_config_test.go
@@ -184,7 +184,7 @@ dir = "/"
}
func newTestConfig() config.Provider {
- cfg := config.New()
+ cfg := config.NewWithTestDefaults()
cfg.Set("workingDir", filepath.FromSlash("/my/cool/hugoproject"))
cfg.Set("contentDir", "content")
cfg.Set("dataDir", "data")
diff --git a/cache/filecache/filecache_test.go b/cache/filecache/filecache_test.go
index 6a051a264..47b5a7fcf 100644
--- a/cache/filecache/filecache_test.go
+++ b/cache/filecache/filecache_test.go
@@ -342,6 +342,7 @@ func newPathsSpec(t *testing.T, fs afero.Fs, configStr string) *helpers.PathSpec
cfg, err := config.FromConfigString(configStr, "toml")
c.Assert(err, qt.IsNil)
initConfig(fs, cfg)
+ config.SetBaseTestDefaults(cfg)
p, err := helpers.NewPathSpec(hugofs.NewFrom(fs, cfg), cfg, nil)
c.Assert(err, qt.IsNil)
return p