This patch takes upload tests 90% of the way there

Comments

chx’s picture

Status: Active » Needs work
FileSize
10.13 KB
chx’s picture

FileSize
10.13 KB

So, this gets rid of encoding and other cruft. Contact tests fail in the most peculiar manner, the third invalid (@site.) tests fail with

[browser] POST to http://localhost/main/admin/build/contact/add, response is 0 bytes. at [/var/www/main/sites/all/modules/simpletest/drupal_test_case.php line 443]

and that's not helped with anything I throw at it -- I tried even curClose and the login before every drupalPost in contact.test to no avail.

Rok Žlender’s picture

Problem is with curl and @ as first char http://si2.php.net/manual/en/ref.curl.php#74814 we would probably need to encode those something like

    $invalid_recipients = array( 'invalid', 'invalid@', 'invalid@site', 'invalid@site.', urlencode(stripslashes('@site.')) , urlencode(stripslashes('@site.com')));

In line 48 of contact module works for me.

Rok Žlender’s picture

That comment on php.net describes problem this one http://si2.php.net/manual/en/ref.curl.php#75044 a possible solution

chx’s picture

FileSize
11.64 KB

We have problems with @ and arrays. I smell a bug or a missing feature, but this stuff codes around it. Does not yet work with upload but taxonomy and contact do pass.

chx’s picture

Status: Needs work » Needs review
FileSize
13.05 KB

There.

Edit: aside from doing uploads, this patch removes now unnecessary cleanup code, fixes taxonomy using story still and finally, assertResponse can be an array again. Sorry for producing a kitchen sink patch :) BTW. drupalVariableSet is now not needed, but that's a followup patch.

boombatower’s picture

Status: Needs review » Needs work

Sorry, HEAD changes frequently and it appears this no longer patches.

chx’s picture

Status: Needs work » Needs review
FileSize
13.34 KB

it pains me that absolute minor problems hold back a patch for days. We are very short on time -- please let me know immediately via IRC or IM when something like this happens, reroll takes a minute or less.

Rok Žlender’s picture

FileSize
18.9 KB

Removed some debuging stuff from chxs patch and made some changes to upload test. We still have one fail in upload test but that is not caused by this issue.

Rok Žlender’s picture

Status: Needs review » Fixed

Committed patch #9 thanks chx

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.