matrix-org / matrix-org/complement

Content-Type check is too restrictive in "TestRegistration/parallel/POST_{}_returns_a_set_of_flows"

オープン
#696 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Go
スター
99
フォーク
72
平均マージ
4日 1時間
マージ済み PR(30日)
8

説明

https://github.com/matrix-org/complement/blob/ad263aa5d0dfbd823d99e486642d71f402a07ffa/tests/csapi/apidoc_register_test.go#L50-L52

In "TestRegistration/parallel/POST_{}_returns_a_set_of_flows" the test strictly required application/json. It's common for many servers to return also a charset in the content type, which is valid according to HTTP. However, complement considers this as a failure which I discovered while testing https://github.com/MTRNord/persephone :)

❌ TestRegistration/parallel/POST_{}_returns_a_set_of_flows (0s)
apidoc_register_test.go:48: MatchResponse got Content-Type: application/json; charset=utf-8 want application/json - http://127.0.0.1:32819/_matrix/client/v3/register => {"flows":[{"stages":["m.login.dummy"]}],"session":"Kbxte1cyWasGZdeIeBsf9FJax"}

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

tests/csapi/apidoc_register_test.go の50〜52行付近から始め、TestRegistration/parallel/POST_{}_returns_a_set_of_flows を実行してください。レスポンスの Content-Type がどのように照合されているかを確認し、そのうえで、テストが有効な charset の例を受け入れつつ、メディアタイプも引き続き検証していることを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go
領域
testing-qa
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。