Add tests for the Dendrite admin APIs (#3028)

Contains a breaking change, since the endpoints `/_dendrite/admin/evacuateRoom/{roomID}` and `/_dendrite/admin/evacuateUser/{userID}` are now using `POST` instead of `GET`
This commit is contained in:
Till 2023-03-27 15:39:33 +02:00 committed by GitHub
parent e8b2162a01
commit fa7710315a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 284 additions and 88 deletions

View file

@ -227,6 +227,7 @@ func (r *Admin) PerformAdminEvacuateUser(
}
return nil
}
res.Affected = append(res.Affected, roomID)
if len(outputEvents) == 0 {
continue
}
@ -237,8 +238,6 @@ func (r *Admin) PerformAdminEvacuateUser(
}
return nil
}
res.Affected = append(res.Affected, roomID)
}
return nil
}