Skip to content

Reset http security settings to fix plug test

h3poteto requested to merge h3poteto/pleroma:fix/test into develop

Now, sometimes a test is failed; like

  1) test referrer-policy header reflects configured value (Pleroma.Web.Plugs.HTTPSecurityPlugTest)
     Assertion with == failed
     code:  assert Conn.get_resp_header(conn, "referrer-policy") == ["same-origin"]
     left:  []
     right: ["same-origin"]
       test/plugs/http_security_plug_test.exs:67: (test)

So I fixed http_security_plug_test.

Now the order of tests is random, so sometimes Config.put([:http_security, :enabled], false) runs before referrer-policy header reflects configured value. So I reset this setting before test referrer.

Merge request reports