Skip to content

Add Coverage validator to zip importer #88

@val99erie

Description

@val99erie

Background Info
When I was deleting the code for the CSV importer (now replaced by the ZIP importer), I found a CoverageValidator, but I couldn't immediately figure out how to make it work with the ZIP importer.

Here's the old code for the:

I suggest that you start with a zip file that is known to import correctly, such as spec/fixtures/import_zips_in_dir/gford-20140000-010011_belfor1r.zip and edit the ISO XML file to remove some of the 4 coverage fields. (There are fields for north, south, east, west limits, and they are all required fields.) A zip with that invalid ISO file should fail to import.

Note:

I removed the code for the CoverageValidator and there were specs for it, but I'm not sure if it was actually hooked up to the CSV importer. I couldn't find any place where the validator was invoked or registered with the importer, so it's possible that this code was never working.

Acceptance Criteria

  • If I have a zip file that is missing one of the 4 coverage fields in the ISO XML file, the validator should catch it and give a good error message about which field(s) are missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions