Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken tests #199

Merged
merged 5 commits into from May 11, 2018
Merged

Fix broken tests #199

merged 5 commits into from May 11, 2018

Conversation

rossjones
Copy link
Contributor

Tests were relying on _rest action calls which have now been removed in
master (and 2.8) and therefore tests were failing.

Makes the tests work, although there is probably some effort required in
determining why metadata_modified is not being returned from
package_show calls.

Also caches the pip output and only tests again latest version of CKAN. For some reason, apart from the first test the following tests were attempting to run with postgres 10.1

Tests were relying on _rest action calls which have now been removed in
master (and 2.8) and therefore tests were failing.

Makes the tests work, although there is probably some effort required in
determining why metadata_modified is not being returned from
package_show calls.

Also caches the pip output, and tests against newer versions of CKAN
- CKANVERSION=master POSTGISVERSION=2
- CKANVERSION=2.2 POSTGISVERSION=2
- CKANVERSION=2.3 POSTGISVERSION=2
- CKANVERSION=2.4 POSTGISVERSION=2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These versions can be definitely be dropped but we need to ensure it works with 2.5 to 2.8. Can you enable these versions and see if tests pass or what we need to fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can. When I tried switching to 2.6, 2.7, 2.8 pip installing the pg lib complained that it couldn't find a version from the string 10.1, which I think seems to be a problem with earlier versions of the postgres library. Not sure why it was trying at all with 10.x though ....

Will try getting them to work this evening ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we've had to fix this in many other extensions as well, this should do the trick: frictionlessdata/ckanext-validation@c652cee

Fixes the problem testing multiple CKAN versions by making sure it uses
psycopg2 2.7 rather than the broken psycopg2 2.6
@rossjones
Copy link
Contributor Author

Mostly seems to fix the problem, but now downloading and building the patched libxml occassionally fails. Maybe we can vendor that file that is downloaded? Am asking because it's 5Mb but if you think it might be safer for the tests?

@amercader
Copy link
Member

@rossjones I'd try to avoid adding the libxml2 file to the repo.
IIRC this was only needed because the version of libxml2 shipped with precise (what Travis is using) was too old: http://docs.ckan.org/projects/ckanext-spatial/en/latest/install.html#when-running-the-spatial-harvesters

Maybe that's not needed any more or we can update the image used by Travis.

Or if the failures are persistent we can just host the file on S3, to make it more reliable

@rossjones
Copy link
Contributor Author

🎉

@rossjones
Copy link
Contributor Author

Seems to be happy now testing 2.5 -> 2.8 + master

@amercader amercader merged commit 6a7e039 into ckan:master May 11, 2018
@amercader
Copy link
Member

Thanks @rossjones!

@rossjones rossjones deleted the fix-travis-and-tests branch May 11, 2018 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants