# |
Jul 3rd 2018, 08:47 |
josbeir |
cant you just add some debug stuff in the failing test and deploy it to see what is happening |
# |
Jul 3rd 2018, 08:46 |
birdy247 |
I wonder if its something to do with bootstrap.php |
# |
Jul 3rd 2018, 08:44 |
josbeir |
maybe it expects some session var to be set, or maybe something fails in a middleware you are using |
# |
Jul 3rd 2018, 08:44 |
birdy247 |
Basically, everything in a particularController failes |
# |
Jul 3rd 2018, 08:43 |
josbeir |
it orchestrates your containers for you |
# |
Jul 3rd 2018, 08:43 |
josbeir |
you can run your pipeline locally to test |
# |
Jul 3rd 2018, 08:43 |
josbeir |
i switched to gitlab-ci just for that purpose |
# |
Jul 3rd 2018, 08:43 |
josbeir |
yeah, thats a bitch to debug... |
# |
Jul 3rd 2018, 08:43 |
birdy247 |
its bitbuckets pipeline |
# |
Jul 3rd 2018, 08:43 |
birdy247 |
not that I can see |
# |
Jul 3rd 2018, 08:43 |
josbeir |
yes i saw |
# |
Jul 3rd 2018, 08:42 |
birdy247 |
its a integration test |
# |
Jul 3rd 2018, 08:42 |
josbeir |
can you access the debug log of your pipeline ? |
# |
Jul 3rd 2018, 08:42 |
birdy247 |
so make me wonder |
# |
Jul 3rd 2018, 08:42 |
birdy247 |
all others are completely fine |
# |
Jul 3rd 2018, 08:42 |
birdy247 |
Its just this 1 test |
# |
Jul 3rd 2018, 08:40 |
josbeir |
and see what happens there |
# |
Jul 3rd 2018, 08:40 |
josbeir |
if its working fine locally then you need to debug it in your pipeline |
# |
Jul 3rd 2018, 08:40 |
liaogz82 |
I run this, gives me NULL ``` public function testCsvDownload() { $csv = $this->get('/reports/export'); $this->assertNotEmpty($csv); } ``` |
# |
Jul 3rd 2018, 08:40 |
birdy247 |
i.e. the tests run when I push to my repo |
# |
Jul 3rd 2018, 08:39 |
birdy247 |
Yes, thats on my pipeline build |
# |
Jul 3rd 2018, 08:39 |
josbeir |
you said: There were 6 failures: 1) App\Test\TestCase\Controller\Admin\MembersControllerTest::testAddManualYearFixedWithOneChosenExtras No location header set. |
# |
Jul 3rd 2018, 08:39 |
birdy247 |
No, this is me running it locally, where it DOES work |
# |
Jul 3rd 2018, 08:39 |
birdy247 |
huh? |
# |
Jul 3rd 2018, 08:39 |
josbeir |
o_O |
# |
Jul 3rd 2018, 08:39 |
josbeir |
:P |
# |
Jul 3rd 2018, 08:39 |
josbeir |
but no location header |
# |
Jul 3rd 2018, 08:38 |
birdy247 |
Hence why I assetRedirect |
# |
Jul 3rd 2018, 08:38 |
birdy247 |
yes |
# |
Jul 3rd 2018, 08:38 |
birdy247 |
but that what I expect |
# |
Jul 3rd 2018, 08:38 |
josbeir |
thats a redirect |
# |
Jul 3rd 2018, 08:38 |
birdy247 |
302 |
# |
Jul 3rd 2018, 08:38 |
josbeir |
idd, _getBodyAsString does the same tho |
# |
Jul 3rd 2018, 08:38 |
dereuromark |
tricky thing, this new psr stuff |
# |
Jul 3rd 2018, 08:38 |
dereuromark |
->getBody()->getContents() :slightly_smiling_face: |
# |
Jul 3rd 2018, 08:37 |
josbeir |
200? |
# |
Jul 3rd 2018, 08:37 |
josbeir |
what is the response code ? |
# |
Jul 3rd 2018, 08:37 |
birdy247 |
Yes |
# |
Jul 3rd 2018, 08:37 |
birdy247 |
File uploaded https://cakesf.slack.com/files/U0T295QA3/FBJ5Y1U5T/-.php / https://slack-files.com/T053DPNCM-FBJ5Y1U5T-7fce34f14c |
# |
Jul 3rd 2018, 08:37 |
josbeir |
set $this->disableErrorHandlerMiddleware() on the top of your test |
# |
Jul 3rd 2018, 08:36 |
birdy247 |
Jst gives '' |