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

Abierto Apto para principiantes
#947 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
testing-qa

Línea de trabajo

La prueba que falla es TestMSC4311FullEventsOnStrippedStateFederation en tests/v12_test.go; la llamada de invitación alrededor de la línea 1597 es donde CSAPI.Must convierte el 404 en un error fatal. Lee esa prueba y el helper de invitación que la rodea, y luego ejecuta el subtest con go test -run TestMSC4311FullEventsOnStrippedStateFederation ./tests/ contra un homeserver. Está terminado cuando la prueba tolera un 404 para el invitado inexistente sin fallar, y sigue comprobando el comportamiento de stripped state que debe verificar.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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)

Lenguaje dominante
Go
Estrellas
102
Forks
73
Merge medio
3 d 10 h
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de matrix-org/complement

Todos los issues de matrix-org/complement

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.