1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

xit instead of comment

This commit is contained in:
Travis Ralston
2019-11-27 19:23:59 -07:00
parent 79b0a5fada
commit 7392b4de17

View File

@@ -277,70 +277,70 @@ describe("SAS verification", function() {
// TODO: Turn this test back on by fixing it.
// See https://github.com/vector-im/riot-web/issues/11545 and related issues.
// it("should verify a cross-signing key", async () => {
// alice.httpBackend.when('POST', '/keys/device_signing/upload').respond(
// 200, {},
// );
// alice.httpBackend.when('POST', '/keys/signatures/upload').respond(200, {});
// alice.httpBackend.flush(undefined, 2);
// await alice.client.resetCrossSigningKeys();
// bob.httpBackend.when('POST', '/keys/device_signing/upload').respond(200, {});
// bob.httpBackend.when('POST', '/keys/signatures/upload').respond(200, {});
// bob.httpBackend.flush(undefined, 2);
//
// await bob.client.resetCrossSigningKeys();
//
// bob.client._crypto._deviceList.storeCrossSigningForUser(
// "@alice:example.com", {
// keys: alice.client._crypto._crossSigningInfo.keys,
// },
// );
//
// alice.httpBackend.when('POST', '/keys/query').respond(200, {
// failures: {},
// device_keys: {
// "@bob:example.com": BOB_DEVICES,
// },
// });
// bob.httpBackend.when('POST', '/keys/query').respond(200, {
// failures: {},
// device_keys: {
// "@alice:example.com": ALICE_DEVICES,
// },
// });
//
// const verifyProm = Promise.all([
// aliceVerifier.verify(),
// bobPromise.then((verifier) => {
// bob.httpBackend.when(
// 'POST', '/keys/signatures/upload',
// ).respond(200, {});
// bob.httpBackend.flush(undefined, 2);
// return verifier.verify();
// }),
// ]);
//
// await alice.httpBackend.flush(undefined, 1);
// console.log("alice reqs flushed");
//
// await verifyProm;
//
// const bobDeviceTrust = alice.client.checkDeviceTrust(
// "@bob:example.com", "Dynabook",
// );
// expect(bobDeviceTrust.isLocallyVerified()).toBeTruthy();
// expect(bobDeviceTrust.isCrossSigningVerified()).toBeFalsy();
//
// const aliceTrust = bob.client.checkUserTrust("@alice:example.com");
// expect(aliceTrust.isCrossSigningVerified()).toBeTruthy();
// expect(aliceTrust.isTofu()).toBeTruthy();
//
// const aliceDeviceTrust = bob.client.checkDeviceTrust(
// "@alice:example.com", "Osborne2",
// );
// expect(aliceDeviceTrust.isLocallyVerified()).toBeTruthy();
// expect(aliceDeviceTrust.isCrossSigningVerified()).toBeFalsy();
// });
xit("should verify a cross-signing key", async () => {
alice.httpBackend.when('POST', '/keys/device_signing/upload').respond(
200, {},
);
alice.httpBackend.when('POST', '/keys/signatures/upload').respond(200, {});
alice.httpBackend.flush(undefined, 2);
await alice.client.resetCrossSigningKeys();
bob.httpBackend.when('POST', '/keys/device_signing/upload').respond(200, {});
bob.httpBackend.when('POST', '/keys/signatures/upload').respond(200, {});
bob.httpBackend.flush(undefined, 2);
await bob.client.resetCrossSigningKeys();
bob.client._crypto._deviceList.storeCrossSigningForUser(
"@alice:example.com", {
keys: alice.client._crypto._crossSigningInfo.keys,
},
);
alice.httpBackend.when('POST', '/keys/query').respond(200, {
failures: {},
device_keys: {
"@bob:example.com": BOB_DEVICES,
},
});
bob.httpBackend.when('POST', '/keys/query').respond(200, {
failures: {},
device_keys: {
"@alice:example.com": ALICE_DEVICES,
},
});
const verifyProm = Promise.all([
aliceVerifier.verify(),
bobPromise.then((verifier) => {
bob.httpBackend.when(
'POST', '/keys/signatures/upload',
).respond(200, {});
bob.httpBackend.flush(undefined, 2);
return verifier.verify();
}),
]);
await alice.httpBackend.flush(undefined, 1);
console.log("alice reqs flushed");
await verifyProm;
const bobDeviceTrust = alice.client.checkDeviceTrust(
"@bob:example.com", "Dynabook",
);
expect(bobDeviceTrust.isLocallyVerified()).toBeTruthy();
expect(bobDeviceTrust.isCrossSigningVerified()).toBeFalsy();
const aliceTrust = bob.client.checkUserTrust("@alice:example.com");
expect(aliceTrust.isCrossSigningVerified()).toBeTruthy();
expect(aliceTrust.isTofu()).toBeTruthy();
const aliceDeviceTrust = bob.client.checkDeviceTrust(
"@alice:example.com", "Osborne2",
);
expect(aliceDeviceTrust.isLocallyVerified()).toBeTruthy();
expect(aliceDeviceTrust.isCrossSigningVerified()).toBeFalsy();
});
});
it("should send a cancellation message on error", async function() {