mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 13:53:09 -06:00
Fix current state server test (sort of)
This commit is contained in:
parent
d6a6b27c5c
commit
16984262bc
|
|
@ -15,6 +15,7 @@
|
||||||
package currentstateserver
|
package currentstateserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"crypto/ed25519"
|
"crypto/ed25519"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -160,8 +161,13 @@ func TestQueryCurrentState(t *testing.T) {
|
||||||
t.Errorf("QueryCurrentState want tuple %+v but it is missing from the response", tuple)
|
t.Errorf("QueryCurrentState want tuple %+v but it is missing from the response", tuple)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(gotEvent.JSON(), wantEvent.JSON()) {
|
gotCanon, err := gomatrixserverlib.CanonicalJSON(gotEvent.JSON())
|
||||||
t.Errorf("QueryCurrentState tuple %+v got event JSON %s want %s", tuple, string(gotEvent.JSON()), string(wantEvent.JSON()))
|
if err != nil {
|
||||||
|
t.Errorf("CanonicalJSON failed: %w", err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !bytes.Equal(gotCanon, wantEvent.JSON()) {
|
||||||
|
t.Errorf("QueryCurrentState tuple %+v got event JSON %s want %s", tuple, string(gotCanon), string(wantEvent.JSON()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue