Skip to content

Commit 19f35f5

Browse files
committed
fix test
Signed-off-by: Grant Linville <[email protected]>
1 parent 512ec19 commit 19f35f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

run_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package gptscript
33
import (
44
"context"
55
"crypto/rand"
6+
"encoding/hex"
67
"runtime"
78
"testing"
89

@@ -53,8 +54,8 @@ func TestStackedContexts(t *testing.T) {
5354
_, err := rand.Read(bytes)
5455
require.NoError(t, err)
5556

56-
context1 := string(bytes)[:16]
57-
context2 := string(bytes)[16:]
57+
context1 := hex.EncodeToString(bytes)[:16]
58+
context2 := hex.EncodeToString(bytes)[16:]
5859

5960
run, err := g.Run(context.Background(), "test/credential.gpt", Options{
6061
CredentialContexts: []string{context1, context2},

0 commit comments

Comments
 (0)