-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that collections exist before allowing import to proceed
1. When a batch import specifies a collection id in tufts:memberOf, check that a collection with that id exists. Otherwise, record an error. 2. Refactor tests so they all either fake out being able to find a collection, or create a collection to find. 3. Skip inconsistent tests. I made tickets to go back and refactor these: #768 and #769
- Loading branch information
Showing
11 changed files
with
105 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
spec/fixtures/files/malformed_files/nonexistent_collection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<OAI-PMH | ||
xmlns="http://www.openarchives.org/OAI/2.0/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:model="info:fedora/fedora-system:def/model#" | ||
xmlns:fcrepo4="http://fedora.info/definitions/v4/repository#" | ||
xmlns:iana="http://www.iana.org/assignments/relation/" | ||
xmlns:marcrelators="http://id.loc.gov/vocabulary/relators/" | ||
xmlns:dc="http://purl.org/dc/terms/" | ||
xmlns:fedoraresourcestatus="http://fedora.info/definitions/1/0/access/ObjState#" | ||
xmlns:scholarsphere="http://scholarsphere.psu.edu/ns#" | ||
xmlns:opaquehydra="http://opaquenamespace.org/ns/hydra/" | ||
xmlns:bibframe="http://bibframe.org/vocab/" | ||
xmlns:dc11="http://purl.org/dc/elements/1.1/" | ||
xmlns:ebucore="http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#" | ||
xmlns:premis="http://www.loc.gov/premis/rdf/v1#" | ||
xmlns:mads="http://www.loc.gov/mads/rdf/v1#" | ||
xmlns:tufts="http://dl.tufts.edu/terms#" | ||
xmlns:edm="http://www.europeana.eu/schemas/edm/" | ||
xmlns:foaf="http://xmlns.com/foaf/0.1/" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> | ||
<ListRecords> | ||
<record> | ||
<metadata> | ||
<mira_import> | ||
<tufts:filename>pdf-sample.pdf</tufts:filename> | ||
<tufts:visibility>open</tufts:visibility> | ||
<model:hasModel>Pdf</model:hasModel> | ||
<dc:title>The Project Gutenberg EBook of Sonnets from the Portuguese by Browning</dc:title> | ||
<tufts:displays_in>dl</tufts:displays_in> | ||
<tufts:memberOf>fake</tufts:memberOf> | ||
</mira_import> | ||
</metadata> | ||
</record> | ||
</ListRecords> | ||
</OAI-PMH> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters