From be1fd40275381294fd15587990199935fe6b5f7f Mon Sep 17 00:00:00 2001 From: Brian Meek Date: Tue, 7 Feb 2023 17:14:16 -0800 Subject: [PATCH] Revert "Fix lint warning about ioutil deprecation" This reverts commit 8610b4225eef7be3af34496900575f5822709d7f. --- clientapi/auth/login_publickey_ethereum_test.go | 4 +++- clientapi/routing/register_publickey_test.go | 4 +++- clientapi/routing/register_test.go | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/clientapi/auth/login_publickey_ethereum_test.go b/clientapi/auth/login_publickey_ethereum_test.go index d90cd5f49..cd7db05b2 100644 --- a/clientapi/auth/login_publickey_ethereum_test.go +++ b/clientapi/auth/login_publickey_ethereum_test.go @@ -37,7 +37,9 @@ type loginContext struct { func createLoginContext(_ *testing.T) *loginContext { cfg := &config.ClientAPI{ - Matrix: &config.Global{}, + Matrix: &config.Global{ + ServerName: testutil.TestServerName, + }, Derived: &config.Derived{}, PasswordAuthenticationDisabled: true, PublicKeyAuthentication: config.PublicKeyAuthentication{ diff --git a/clientapi/routing/register_publickey_test.go b/clientapi/routing/register_publickey_test.go index 19960ed22..961873b89 100644 --- a/clientapi/routing/register_publickey_test.go +++ b/clientapi/routing/register_publickey_test.go @@ -42,7 +42,9 @@ type registerContext struct { func createRegisterContext(_ *testing.T) *registerContext { cfg := &config.ClientAPI{ - Matrix: &config.Global{}, + Matrix: &config.Global{ + ServerName: testutil.TestServerName, + }, Derived: &config.Derived{}, PasswordAuthenticationDisabled: true, PublicKeyAuthentication: config.PublicKeyAuthentication{ diff --git a/clientapi/routing/register_test.go b/clientapi/routing/register_test.go index f90b3f06c..bccc1b79b 100644 --- a/clientapi/routing/register_test.go +++ b/clientapi/routing/register_test.go @@ -475,7 +475,7 @@ func Test_register(t *testing.T) { // The first request should return a userInteractiveResponse switch r := resp.JSON.(type) { - case UserInteractiveResponse: + case userInteractiveResponse: // Check that the flows are the ones we configured if !reflect.DeepEqual(r.Flows, base.Cfg.Derived.Registration.Flows) { t.Fatalf("unexpected registration flows: %+v, want %+v", r.Flows, base.Cfg.Derived.Registration.Flows) @@ -506,7 +506,7 @@ func Test_register(t *testing.T) { } // If we reached this, we should have received a UIA response - uia, ok := resp.JSON.(UserInteractiveResponse) + uia, ok := resp.JSON.(userInteractiveResponse) if !ok { t.Fatalf("did not receive a userInteractiveResponse: %T", resp.JSON) }