planetfederal / django-osgeo-importer

Do not use this repo, use https://github.com/GeoNode/django-osgeo-importer
GNU General Public License v3.0
2 stars 1 forks source link

Test cleanup #21

Closed ghost closed 8 years ago

ghost commented 8 years ago

This is prep for work on coverage and meaning of tests.

sarasafavi commented 8 years ago

Digging into this now, review in-progress but may take a bit

sarasafavi commented 8 years ago

I don't find anything questionable in here -- only request @harts-boundless is to squash it down a little prior to merging (though I appreciate the separate commits for review purposes). Tests still pass + tests.py is finally flake8-friendly, so :+1:

ghost commented 8 years ago

This is going to be delayed in order to resolve merge conflicts with test changes from multifile.

ghost commented 8 years ago

I intended to kill the last bugs today (there is something obscure going on when I do some otherwise innocent-looking renames, and smoke testing some of the tests with no assertions reveals everything isn't working as expected). But it was not possible because I was working on giving more information about possible approach to unified search. So it has to wait. At least nothing is immediately depending on this.

sarasafavi commented 8 years ago

Note: tests pass fine on my local dev box; just kicked Travis to re-run here, if they still come up red it's an issue with Travis CI (not the code itself)

test_double (osgeo_importer.test_views.TestFileAddView_upload) ... ok
test_empty (osgeo_importer.test_views.TestFileAddView_upload)
Empty data should return None. ... ok
test_many_too_long (osgeo_importer.test_views.TestFileAddView_upload) ... ok
test_single (osgeo_importer.test_views.TestFileAddView_upload) ... ok
test_single_too_long (osgeo_importer.test_views.TestFileAddView_upload) ... ok
test_api_import (osgeo_importer.tests.UploaderTests)
Tests the import api. ... ok
test_arcgisjson (osgeo_importer.tests.UploaderTests)
Tests the import from a WFS Endpoint ... ok
test_box_with_year_field (osgeo_importer.tests.UploaderTests)
Tests the import of test_box_with_year_field. ... ok
test_boxes_plus_raster_gpkg_by_index (osgeo_importer.tests.UploaderTests)
Tests the import of multilayer vector + raster geopackage using index ... ok
test_boxes_with_date (osgeo_importer.tests.UploaderTests)
Tests the import of test_boxes_with_date. ... ok
test_boxes_with_date_csv (osgeo_importer.tests.UploaderTests)
Tests a CSV with WKT polygon. ... ok
test_boxes_with_date_gpkg (osgeo_importer.tests.UploaderTests)
Tests the import of test_boxes_with_date.gpkg. ... ok
test_boxes_with_date_iso_date_zip (osgeo_importer.tests.UploaderTests)
Tests the import of test_boxes_with_iso_date. ... ok
test_boxes_with_dates_bc (osgeo_importer.tests.UploaderTests)
Tests the import of test_boxes_with_dates_bc. ... ok
test_boxes_with_end_date (osgeo_importer.tests.UploaderTests)
Tests the import of test_boxes_with_end_date. ... ok
test_boxes_with_iso_date (osgeo_importer.tests.UploaderTests)
Tests the import of test_boxes_with_iso_date. ... ok
test_configure_view (osgeo_importer.tests.UploaderTests)
Tests the configuration view. ... ok
test_configure_view_convert_date (osgeo_importer.tests.UploaderTests)
Tests the configure view with a dataset that needs to be converted to a date. ... ok
test_csv_missing_features (osgeo_importer.tests.UploaderTests)
Test csv that has some rows without geoms and uses ISO-8859 (Latin 4) encoding. ... ok
test_csv_with_wkb_geometry (osgeo_importer.tests.UploaderTests)
Exercise import of CSV files with multiple geometries. ... ok
test_delete_from_admin_api (osgeo_importer.tests.UploaderTests)
Ensure that administrators can delete data that isn't theirs. ... ok
test_delete_from_non_admin_api (osgeo_importer.tests.UploaderTests)
Ensure users can delete their data. ... ok
test_describe_fields (osgeo_importer.tests.UploaderTests)
Tests the describe fields functionality. ... ok
test_duplicate_imports (osgeo_importer.tests.UploaderTests)
Import the same layer twice to ensure file names increment properly. ... ok
test_fid_field (osgeo_importer.tests.UploaderTests) ... ok
test_file_add_view (osgeo_importer.tests.UploaderTests)
Tests the file_add_view. ... ok
test_file_add_view_as_json (osgeo_importer.tests.UploaderTests)
Tests the file_add_view. ... ok
test_gdal_file_type (osgeo_importer.tests.UploaderTests)
Tests the describe fields functionality. ... ok
test_gdal_import (osgeo_importer.tests.UploaderTests) ... ok
test_gwc_handler (osgeo_importer.tests.UploaderTests)
Tests the GeoWebCache handler ... ok
test_istanbul (osgeo_importer.tests.UploaderTests)
Tests shapefile with multipart polygons and non-WGS84 SR. ... ok
test_launder (osgeo_importer.tests.UploaderTests)
Ensure the launder function works as expected. ... ok
test_layer_list_api (osgeo_importer.tests.UploaderTests) ... ok
test_list_api (osgeo_importer.tests.UploaderTests) ... ok
test_mojstrovka_gpx (osgeo_importer.tests.UploaderTests)
Tests the import of mojstrovka.gpx. ... ok
test_multi_upload (osgeo_importer.tests.UploaderTests)
Tests Uploading Multiple Files ... ok
test_multipolygon_shapefile (osgeo_importer.tests.UploaderTests)
Tests shapefile with multipart polygons. ... ok
test_no_geom (osgeo_importer.tests.UploaderTests)
Test the file extension validator. ... ok
test_non_converted_date (osgeo_importer.tests.UploaderTests)
Test converting a field as date. ... ok
test_numeric_overflow (osgeo_importer.tests.UploaderTests)
Regression test for numeric field overflows in shapefiles. ... ok
test_point_with_date (osgeo_importer.tests.UploaderTests)
Tests the import of point_with_date.geojson ... ok
test_raster (osgeo_importer.tests.UploaderTests)
Exercise raster import. ... ok
test_sitins (osgeo_importer.tests.UploaderTests)
Tests the import of US_Civil_Rights_Sitins0.csv ... ok
test_upload_with_metadata (osgeo_importer.tests.UploaderTests)
Tests Uploading metadata ... ok
test_upload_with_slds (osgeo_importer.tests.UploaderTests)
Tests Uploading sld ... ok
test_us_shootings_csv (osgeo_importer.tests.UploaderTests)
Tests the import of US_Shootings.csv. ... ok
test_us_states_kml (osgeo_importer.tests.UploaderTests)
Tests the import of us_states_kml. ... ok
test_utf8 (osgeo_importer.tests.UploaderTests)
Tests utf8 characters in attributes ... ok
test_valid_file_extensions (osgeo_importer.tests.UploaderTests)
Test the file extension validator. ... ok
test_wfs (osgeo_importer.tests.UploaderTests)
Tests the import from a WFS Endpoint ... ok

----------------------------------------------------------------------
Ran 50 tests in 173.530s

OK
ghost commented 8 years ago

To summarize things we are finding: this seems to relate to the CREATE EXTENSION being used to enable PostGIS; the error message clearly suggesting that it is now looking for PostGIS 2.3 instead of 2.2 or 2.1. The very recent release of PostGIS 2.3 (Sept 26) and the use of an unpinned apt-get install of package "postgis" suggests a cause. Maybe postgis was updated in pgdg or something, and importer's install.sh scaffolding to avoid using it is now broken.

Our idea about why it is still working locally in Vagrant is that we provisioned before the postgis upgrade.

sarasafavi commented 8 years ago

@harts-boundless I'm good with this in its current state; it's only coincidental that the Travis CI/postgis version issues have popped up concurrently with this PR. Since I've verified that the tests are good + pass in a dev env, I'm going to merge in & we'll continue investigating postgis/travis troubles later this week (as travel allows)