Revert "Fix lint warning about ioutil deprecation"

This reverts commit 8610b4225e.
This commit is contained in:
Brian Meek 2023-02-07 17:14:16 -08:00
parent 92e468f352
commit be1fd40275
3 changed files with 8 additions and 4 deletions

View file

@ -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{

View file

@ -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{

View file

@ -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)
}