diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-07-30 15:47:34 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-07-31 16:44:06 +0200 |
commit | e67886c038dc79755c14ec77bbeff6605953f9ef (patch) | |
tree | 6b36585a55796b5a29d41764175e4d6d82a0d206 /hugolib/pagebundler_test.go | |
parent | d5eda13cb2e57998210b66e080dc96e95b38e5f0 (diff) | |
download | hugo-e67886c038dc79755c14ec77bbeff6605953f9ef.tar.gz hugo-e67886c038dc79755c14ec77bbeff6605953f9ef.zip |
Consolidate all hashing to the common/hashing package
And remove now unsued hashing funcs.
Diffstat (limited to 'hugolib/pagebundler_test.go')
-rw-r--r-- | hugolib/pagebundler_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hugolib/pagebundler_test.go b/hugolib/pagebundler_test.go index 302201a1f..e4da75a72 100644 --- a/hugolib/pagebundler_test.go +++ b/hugolib/pagebundler_test.go @@ -19,12 +19,11 @@ import ( "path/filepath" "testing" + "github.com/gohugoio/hugo/common/hashing" "github.com/gohugoio/hugo/common/loggers" "github.com/gohugoio/hugo/config" - "github.com/gohugoio/hugo/helpers" - "github.com/gohugoio/hugo/hugofs" "github.com/gohugoio/hugo/resources/kinds" @@ -701,13 +700,13 @@ bundle min min key: {{ $jsonMinMin.Key }} b.AssertFileContent(index, fmt.Sprintf("data content unmarshaled: v%d", i)) b.AssertFileContent(index, fmt.Sprintf("data assets content unmarshaled: v%d", i)) - md5Asset := helpers.MD5String(fmt.Sprintf(`vdata: v%d`, i)) + md5Asset := hashing.MD5FromStringHexEncoded(fmt.Sprintf(`vdata: v%d`, i)) b.AssertFileContent(index, fmt.Sprintf("assets fingerprinted: /data%d/data.%s.yaml", i, md5Asset)) // The original is not used, make sure it's not published. b.Assert(b.CheckExists(fmt.Sprintf("public/data%d/data.yaml", i)), qt.Equals, false) - md5Bundle := helpers.MD5String(fmt.Sprintf(`data: v%d`, i)) + md5Bundle := hashing.MD5FromStringHexEncoded(fmt.Sprintf(`data: v%d`, i)) b.AssertFileContent(index, fmt.Sprintf("bundle fingerprinted: /bundle%d/data.%s.yaml", i, md5Bundle)) b.AssertFileContent(index, |