Fix lint warning about ioutil deprecation

Signed-off-by: Brian Meek <brian@hntlabs.com>
This commit is contained in:
Brian Meek 2023-02-07 08:24:08 -08:00
parent 6225873d04
commit 8610b4225e
3 changed files with 4 additions and 8 deletions

View file

@ -37,9 +37,7 @@ type loginContext struct {
func createLoginContext(_ *testing.T) *loginContext { func createLoginContext(_ *testing.T) *loginContext {
cfg := &config.ClientAPI{ cfg := &config.ClientAPI{
Matrix: &config.Global{ Matrix: &config.Global{},
ServerName: testutil.TestServerName,
},
Derived: &config.Derived{}, Derived: &config.Derived{},
PasswordAuthenticationDisabled: true, PasswordAuthenticationDisabled: true,
PublicKeyAuthentication: config.PublicKeyAuthentication{ PublicKeyAuthentication: config.PublicKeyAuthentication{

View file

@ -42,9 +42,7 @@ type registerContext struct {
func createRegisterContext(_ *testing.T) *registerContext { func createRegisterContext(_ *testing.T) *registerContext {
cfg := &config.ClientAPI{ cfg := &config.ClientAPI{
Matrix: &config.Global{ Matrix: &config.Global{},
ServerName: testutil.TestServerName,
},
Derived: &config.Derived{}, Derived: &config.Derived{},
PasswordAuthenticationDisabled: true, PasswordAuthenticationDisabled: true,
PublicKeyAuthentication: config.PublicKeyAuthentication{ PublicKeyAuthentication: config.PublicKeyAuthentication{

View file

@ -475,7 +475,7 @@ func Test_register(t *testing.T) {
// The first request should return a userInteractiveResponse // The first request should return a userInteractiveResponse
switch r := resp.JSON.(type) { switch r := resp.JSON.(type) {
case userInteractiveResponse: case UserInteractiveResponse:
// Check that the flows are the ones we configured // Check that the flows are the ones we configured
if !reflect.DeepEqual(r.Flows, base.Cfg.Derived.Registration.Flows) { 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) 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 // If we reached this, we should have received a UIA response
uia, ok := resp.JSON.(userInteractiveResponse) uia, ok := resp.JSON.(UserInteractiveResponse)
if !ok { if !ok {
t.Fatalf("did not receive a userInteractiveResponse: %T", resp.JSON) t.Fatalf("did not receive a userInteractiveResponse: %T", resp.JSON)
} }