aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/integrationtest_builder.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-21 20:16:02 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-22 15:36:27 +0100
commit16406d9d77cb4861bba9df8ca39e7dadfe41eb45 (patch)
treef32a3921081e40a748613bd87eba7940d6b975db /hugolib/integrationtest_builder.go
parente75784930dca9e367019ce498fd15076a63edb34 (diff)
downloadhugo-16406d9d77cb4861bba9df8ca39e7dadfe41eb45.tar.gz
hugo-16406d9d77cb4861bba9df8ca39e7dadfe41eb45.zip
Fix regression on handling of overlapping file mounts
But note that the overlay file system is set up horizontally (project -> module1 -> module2), so I would not recommend too complex overlapping mount setups within the same module. But this worked in v0.122.0, so we should fix it. Fixes #12103
Diffstat (limited to 'hugolib/integrationtest_builder.go')
-rw-r--r--hugolib/integrationtest_builder.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/hugolib/integrationtest_builder.go b/hugolib/integrationtest_builder.go
index 194b79c68..8c7017a87 100644
--- a/hugolib/integrationtest_builder.go
+++ b/hugolib/integrationtest_builder.go
@@ -275,9 +275,13 @@ func (s *IntegrationTestBuilder) AssertFileContentExact(filename string, matches
}
func (s *IntegrationTestBuilder) AssertPublishDir(matches ...string) {
+ s.AssertFs(s.fs.PublishDir, matches...)
+}
+
+func (s *IntegrationTestBuilder) AssertFs(fs afero.Fs, matches ...string) {
s.Helper()
var buff bytes.Buffer
- helpers.PrintFs(s.H.Fs.PublishDir, "", &buff)
+ helpers.PrintFs(fs, "", &buff)
printFsLines := strings.Split(buff.String(), "\n")
sort.Strings(printFsLines)
content := strings.TrimSpace((strings.Join(printFsLines, "\n")))