Rework the Destination filesystem to make --renderStaticToDisk work

See #9626
This commit is contained in:
Bjørn Erik Pedersen
2022-03-21 09:35:15 +01:00
parent b08193971a
commit d070bdf10f
75 changed files with 651 additions and 566 deletions

View File

@@ -79,7 +79,7 @@ func newTestResourceSpec(desc specDescriptor) *Spec {
cfg.Set("imaging", imagingCfg)
fs := hugofs.NewFrom(afs, cfg)
fs.Destination = hugofs.NewCreateCountingFs(fs.Destination)
fs.PublishDir = hugofs.NewCreateCountingFs(fs.PublishDir)
s, err := helpers.NewPathSpec(fs, cfg, nil)
c.Assert(err, qt.IsNil)
@@ -118,7 +118,6 @@ func newTestResourceOsFs(c *qt.C) (*Spec, string) {
cfg.Set("workingDir", workDir)
fs := hugofs.NewFrom(hugofs.NewBaseFileDecorator(hugofs.Os), cfg)
fs.Destination = &afero.MemMapFs{}
s, err := helpers.NewPathSpec(fs, cfg, nil)
c.Assert(err, qt.IsNil)