Skip to content

Commit 1b8a659

Browse files
committed
msc3861: tests
1 parent c490bad commit 1b8a659

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

clientapi/routing/key_crosssigning_test.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
type mockKeyAPI struct {
2525
t *testing.T
2626
queryKeysData map[string]api.QueryKeysResponse
27-
queryMasterKeysData map[string]api.QueryMasterKeysResponse
2827
}
2928

3029
func (m mockKeyAPI) QueryKeys(ctx context.Context, req *api.QueryKeysRequest, res *api.QueryKeysResponse) {
@@ -36,14 +35,6 @@ func (m mockKeyAPI) QueryKeys(ctx context.Context, req *api.QueryKeysRequest, re
3635
}
3736
}
3837

39-
func (m mockKeyAPI) QueryMasterKeys(ctx context.Context, req *api.QueryMasterKeysRequest, res *api.QueryMasterKeysResponse) {
40-
res.Key = m.queryMasterKeysData[req.UserID].Key
41-
res.Error = m.queryMasterKeysData[req.UserID].Error
42-
if m.t != nil {
43-
m.t.Logf("QueryMasterKeys: %+v => %+v", req, res)
44-
}
45-
}
46-
4738
func (m mockKeyAPI) PerformUploadDeviceKeys(ctx context.Context, req *api.PerformUploadDeviceKeysRequest, res *api.PerformUploadDeviceKeysResponse) {
4839
// Just a dummy upload which always succeeds
4940
}
@@ -67,9 +58,6 @@ func Test_UploadCrossSigningDeviceKeys_ValidRequest(t *testing.T) {
6758
queryKeysData: map[string]api.QueryKeysResponse{
6859
"@user:example.com": {},
6960
},
70-
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
71-
"@user:example.com": {},
72-
},
7361
}
7462
device := &api.Device{UserID: "@user:example.com", ID: "device"}
7563
cfg := &config.ClientAPI{
@@ -130,11 +118,6 @@ func Test_UploadCrossSigningDeviceKeys_Unauthorised(t *testing.T) {
130118
UserSigningKeys: nil,
131119
},
132120
},
133-
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
134-
"@user:example.com": {
135-
Key: spec.Base64Bytes("key1"),
136-
},
137-
},
138121
}
139122
device := &api.Device{UserID: "@user:example.com", ID: "device"}
140123
cfg := &config.ClientAPI{
@@ -194,11 +177,6 @@ func Test_UploadCrossSigningDeviceKeys_ExistingKeysMismatch(t *testing.T) {
194177
},
195178
},
196179
},
197-
queryMasterKeysData: map[string]api.QueryMasterKeysResponse{
198-
"@user:example.com": {
199-
Key: spec.Base64Bytes("different_key"),
200-
},
201-
},
202180
}
203181
device := &api.Device{UserID: "@user:example.com", ID: "device"}
204182

0 commit comments

Comments
 (0)