From c46434f6e011bf4e02dc3e9cb82ac1d40edd4a2b Mon Sep 17 00:00:00 2001 From: Herman Slatman Date: Mon, 15 Jan 2024 19:44:02 +0100 Subject: [PATCH] Make the example Wire handle consistent --- acme/api/wire_integration_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/acme/api/wire_integration_test.go b/acme/api/wire_integration_test.go index 737fbc71..bf0a3792 100644 --- a/acme/api/wire_integration_test.go +++ b/acme/api/wire_integration_test.go @@ -52,6 +52,8 @@ func newWireProvisionerWithOptions(t *testing.T, options *provisioner.Options) * return a } +// TODO(hs): replace with test CA server + acmez based test client for +// more realistic integration test? func TestWireIntegration(t *testing.T) { fakeKey := `-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEA5c+4NKZSNQcR1T8qN6SjwgdPZQ0Ge12Ylx/YeGAJ35k= @@ -313,7 +315,7 @@ MCowBQYDK2VwAyEA5c+4NKZSNQcR1T8qN6SjwgdPZQ0Ge12Ylx/YeGAJ35k= t.Log("updated challenge:", challenge.ID, challenge.Status) switch challenge.Type { case acme.WIREOIDC01: - err = db.CreateOidcToken(ctx, order.ID, map[string]any{"name": "Smith, Alice M (QA)", "handle": "%40alice.smith.qa@example.com"}) + err = db.CreateOidcToken(ctx, order.ID, map[string]any{"name": "Smith, Alice M (QA)", "handle": "wireapp://%40alice.smith.qa@example.com"}) require.NoError(t, err) case acme.WIREDPOP01: err = db.CreateDpopToken(ctx, order.ID, map[string]any{"sub": "wireapp://lJGYPz0ZRq2kvc_XpdaDlA!ed416ce8ecdd9fad@example.com"}) @@ -374,7 +376,7 @@ MCowBQYDK2VwAyEA5c+4NKZSNQcR1T8qN6SjwgdPZQ0Ge12Ylx/YeGAJ35k= cert, err := ca.Sign(template) require.NoError(t, err) - u1, err := url.Parse("%40alice.smith.qa@example.com") + u1, err := url.Parse("wireapp://%40alice.smith.qa@example.com") require.NoError(t, err) u2, err := url.Parse("wireapp://lJGYPz0ZRq2kvc_XpdaDlA%21ed416ce8ecdd9fad@example.com") require.NoError(t, err)