aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/pkg_test.go')
-rw-r--r--internal/pkg/pkg_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go
index 1151a681..f295ef0b 100644
--- a/internal/pkg/pkg_test.go
+++ b/internal/pkg/pkg_test.go
@@ -3,7 +3,6 @@ package pkg_test
import (
"bytes"
"crypto/sha512"
- "encoding/base64"
"io/fs"
"net/http"
"os"
@@ -51,8 +50,8 @@ func TestIdent(t *testing.T) {
if got := tc.kind.Ident(tc.params, tc.deps...); got != tc.want {
t.Errorf("Ident: %s, want %s",
- base64.URLEncoding.EncodeToString(got[:]),
- base64.URLEncoding.EncodeToString(tc.want[:]))
+ pkg.Encode(got),
+ pkg.Encode(tc.want))
}
})
}
@@ -132,7 +131,7 @@ func TestCache(t *testing.T) {
return (pkg.Checksum)(h.Sum(nil))
}()
- testdataChecksumString := base64.URLEncoding.EncodeToString(testdataChecksum[:])
+ testdataChecksumString := pkg.Encode(testdataChecksum)
testCases := []cacheTestCase{
{"file", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) {
@@ -267,7 +266,7 @@ func TestCache(t *testing.T) {
var gotChecksum pkg.Checksum
wantPathnameG := base.Append(
"identifier",
- base64.URLEncoding.EncodeToString(wantChecksum[:]),
+ pkg.Encode(wantChecksum),
)
if pathname, err := c.StoreFile(
wantChecksum,