invocation: round of cleanups/fixes

This commit is contained in:
Michael Muré
2024-11-05 17:39:39 +01:00
committed by Steve Moyer
parent 3dc0011628
commit 7d4f973171
8 changed files with 79 additions and 101 deletions

View File

@@ -8,9 +8,10 @@ import (
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gotest.tools/v3/golden"
"github.com/ucan-wg/go-ucan/token/internal/envelope"
"github.com/ucan-wg/go-ucan/token/invocation"
"gotest.tools/v3/golden"
)
const (
@@ -78,6 +79,7 @@ func TestSchemaRoundTrip(t *testing.T) {
assert.JSONEq(t, string(invocationJson), readJson.String())
})
}
func privKey(t require.TestingT, privKeyCfg string) crypto.PrivKey {
privKeyMar, err := crypto.ConfigDecodeKey(privKeyCfg)
require.NoError(t, err)