-
Type:
Bug
-
Status: Closed
-
Resolution: No Longer Reproducible
-
Affects Version/s: Master
-
Fix Version/s: Master
-
Component/s: Testing > CI environments
-
Labels:None
We had a test scenario which behaves differently on CI than local environment and we can't find any reason.
Please see this PR: https://github.com/martamedio/liferay-portal/pull/157
In this test we're trying to launch a request using Portal Session Authentication to check CORS functionality, so we're trying to recover a Portal Session Cookie (_getAuthenticatedCookie()):
1. Request to "web/request" to obtain an _p_auth_ token
2. Second request to log in as test@liferay.com/test
3. After the previous request we detected locally that we need to perform redirection (this request fails on CI)
4. We try to obtain a cookie to launch our test, but after the failed redirection we obtain an Exception trying to find that cookie.
If you run this test in a local environment, it works perfectly.
In previous executions we already log the response on CI and looks like that after login (step 2) it returns a response with some redirection using Javascript (locally we obtain a 302 Response to perform the redirection), see: https://github.com/topolik/liferay-portal/pull/842#issuecomment-641488602
Also note that we have a similar test in OAuth2 module, where there has been no problem getting this cookie.