Skip to content

Commit

Permalink
Merge pull request #30 from matrix-org/kegan/no-fallback-key-cycle-check
Browse files Browse the repository at this point in the history
Don't check that the fallback key cycles in TestFallbackKeyIsUsedIfOneTimeKeysRunOut
  • Loading branch information
kegsay authored Mar 20, 2024
2 parents 2413264 + e33d436 commit 4241c21
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions tests/one_time_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,8 @@ func TestFallbackKeyIsUsedIfOneTimeKeysRunOut(t *testing.T) {
return nil
})

// now re-block /keys/upload, re-claim all otks, and check that the fallback key this time around is different
// to the first
tc.Deployment.WithMITMOptions(t, map[string]interface{}{
"statuscode": map[string]interface{}{
"return_status": http.StatusGatewayTimeout,
"block_request": true,
"filter": "~u .*\\/keys\\/upload.*",
},
}, func() {
// claim all OTKs
mustClaimOTKs(t, otkGobbler, tc.Alice, int(otkCount))

// now claim the fallback key
secondFallbackKeyID, secondFallbackKey := mustClaimFallbackKey(t, otkGobbler, tc.Alice)
t.Logf("second fallback key %s => %s", secondFallbackKeyID, secondFallbackKey.Get("key").Str)
must.NotEqual(t, secondFallbackKeyID, fallbackKeyID, "fallback key id same as before, not cycled?")
must.NotEqual(t, fallbackKey.Get("key").Str, secondFallbackKey.Get("key").Str, "fallback key data same as before, not cycled?")
})
// We do not check if the fallback key is cycled because some clients don't trust the server to tell them.
// see https://github.com/matrix-org/matrix-rust-sdk/pull/3151
})
})
}
Expand Down

0 comments on commit 4241c21

Please sign in to comment.