diff options
author | Linus Nordberg <linus@nordberg.se> | 2022-03-14 15:19:18 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-03-15 18:59:02 +0100 |
commit | 93542012e45cfa53964a7160969db30fc36229b2 (patch) | |
tree | 35ddada38ca066c30595e9e91d1d77b8e7ea4049 | |
parent | 94195d3af2933dd02bf75708a0096bfcef775347 (diff) |
use ASCII serialised leaves in Test*FromASCII()
-rw-r--r-- | pkg/types/leaf_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/types/leaf_test.go b/pkg/types/leaf_test.go index 0ae6431..00e8256 100644 --- a/pkg/types/leaf_test.go +++ b/pkg/types/leaf_test.go @@ -140,7 +140,7 @@ func TestLeafFromASCII(t *testing.T) { }, { desc: "invalid: not a tree leaf (too many key-value pairs)", - serialized: bytes.NewBuffer(append(validLeafBytes(t)[:], []byte("key=value\n")...)), + serialized: bytes.NewBuffer(append([]byte(validLeafASCII(t)), []byte("key=value\n")...)), wantErr: true, }, { @@ -177,7 +177,7 @@ func TestLeavesFromASCII(t *testing.T) { }, { desc: "invalid: not a list of tree leaves (too many key-value pairs)", - serialized: bytes.NewBuffer(append(validLeafBytes(t)[:], []byte("key=value\n")...)), + serialized: bytes.NewBuffer(append([]byte(validLeafASCII(t)), []byte("key=value\n")...)), wantErr: true, }, { |