From f5a2f436df9881988a98bd1808dcb6727d15f700 Mon Sep 17 00:00:00 2001 From: Herman Slatman Date: Tue, 9 Jan 2024 18:24:37 +0100 Subject: [PATCH] Fix missing `DPoP` and `OIDC` tokens for Wire integration test --- acme/api/im_integration_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/acme/api/im_integration_test.go b/acme/api/im_integration_test.go index de4b5543..24ad2da3 100644 --- a/acme/api/im_integration_test.go +++ b/acme/api/im_integration_test.go @@ -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()