test: update test now that behavior of erp5.com changed
apparently with caddy we redirect http->https with a 301
This test checking that http://www.erp5.com was redirecting to https://www.erp5.com with 302 started to fail when we switched to caddy.
It seems that with our caddy frontend behaviour of
https-only
changed, we now redirect with 301 and no longer 302 ( here ). According to https://caddyserver.com/docs/redirredir
by default makes permanent redirections.@luke @tomo @rafael is that intentional ? do we want to change caddy instead ?
( see also 154f61d5 (comment 71994) but we wouldn't have noticed this change :) )
Edited by Jérome Perrintest results: python 2 python3 - unsupported yet
I prefer to do so, I will check if I missed assertion and add one.
So as I see in the test, the assertion for http code was missing in test_https_only, that's why the test passed on
apache-frontend
andcaddy-frontend
.So I am going to make another MR adding assertion for 302 and fixing it.
Edit: I noted that
test_type_redirect
was also missing HTTP code assertion.Edited by Łukasz NowakSo we did slapos!485 (merged) and once we update production frontend this will be solved. These changes are not needed.
Thanks again @luke