Fix missing DPoP and OIDC tokens for Wire integration test

This commit is contained in:
Herman Slatman 2024-01-09 18:24:37 +01:00
parent eb9893bd21
commit f5a2f436df
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

View File

@ -27,6 +27,7 @@ import (
"github.com/smallstep/certificates/authority"
"github.com/smallstep/certificates/authority/provisioner"
nosqlDB "github.com/smallstep/nosql"
"github.com/stretchr/testify/require"
"go.step.sm/crypto/jose"
)
@ -423,6 +424,12 @@ func TestIMIntegration(t *testing.T) {
t.Fatal("encode finalize request:", err)
}
// TODO(hs): move these to a more appropriate place and/or provide more realistic value
err = db.CreateDpopToken(ctx, order.ID, map[string]any{"fake-dpop": "dpop-value"})
require.NoError(t, err)
err = db.CreateOidcToken(ctx, order.ID, map[string]any{"fake-oidc": "oidc-value"})
require.NoError(t, err)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: frRaw})
chiCtx := chi.NewRouteContext()