mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Revert "Fix lint warning about ioutil deprecation"
This reverts commit 8610b4225e.
This commit is contained in:
parent
92e468f352
commit
be1fd40275
|
|
@ -37,7 +37,9 @@ 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,7 +42,9 @@ 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