`TestMSC4311FullEventsOnStrippedStateFederation` fails if the homeserver refuses to produce an invite for a non-existing user

Aperta Adatta ai principianti
#947 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
testing-qa

Direzione di ricerca

Il test che fallisce è TestMSC4311FullEventsOnStrippedStateFederation in tests/v12_test.go; la chiamata di invito intorno alla riga 1597 è il punto in cui CSAPI.Must trasforma il 404 in un errore fatale. Leggi quel test e l'helper di invito che lo circonda, poi esegui il subtest con go test -run TestMSC4311FullEventsOnStrippedStateFederation ./tests/ contro un homeserver. È completato quando il test tollera un 404 per l'invitato inesistente senza fallire, continuando a verificare il comportamento di stripped state che dovrebbe controllare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

From what I can see, Alice tries to invite Bob, but never registers bob: https://github.com/matrix-org/complement/blob/e3fcff1998d91f71cae096679b3ec737dda69fdd/tests/v12_test.go#L1595-L1597

Then, if the server returns an error because it doesn't recognise the invitee, complement fails the entire test (non-200 code):

  ❌ TestMSC4311FullEventsOnStrippedStateFederation/parallel (FAIL; 0s)
  ❌ TestMSC4311FullEventsOnStrippedStateFederation/parallel/`invite_room_state` (FAIL; 380ms)
    client.go:893: [CSAPI] POST hs1/_matrix/client/v3/register => 401 Unauthorized (361.421µs)
    client.go:893: [CSAPI] POST hs1/_matrix/client/v3/register => 200 OK (195.359442ms)
    client.go:893: [CSAPI] POST hs1/_matrix/client/v3/createRoom => 200 OK (98.712927ms)
    client.go:893: [CSAPI] POST hs1/_matrix/client/v3/rooms/!kqDNpAeTQj7OTwOK2OAv7zRIgvRWnaGbKWkNJbThDI8/invite => 404 Not Found (2.093963ms)
    v12_test.go:1597: CSAPI.Must: POST http://127.0.0.1:32953/_matrix/client/v3/rooms/%21kqDNpAeTQj7OTwOK2OAv7zRIgvRWnaGbKWkNJbThDI8/invite returned non-2xx code: 404 Not Found - body: {"errcode":"M_NOT_FOUND","error":"User does not exist"}         

The spec does not require that the server produces invites for users that do not exist, and it would be pretty silly to do so (even if most servers nowadays allow this to prevent things like user enumeration)

Lingua principale
Go
Stelle
102
Fork
73
Merge medio
1g 2h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di matrix-org/complement

Tutte le issue di matrix-org/complement

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.