mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Fix lint warning about ioutil deprecation
Signed-off-by: Brian Meek <brian@hntlabs.com>
This commit is contained in:
parent
b41d9915d7
commit
5e556292c9
|
|
@ -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{
|
||||||
|
|
|
||||||
|
|
@ -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{
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue