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

Fcrepo indexing #39

Merged
merged 11 commits into from
May 4, 2017
Merged

Fcrepo indexing #39

merged 11 commits into from
May 4, 2017

Conversation

dannylamb
Copy link
Contributor

GitHub Issue: Resolves Islandora/documentation#597

  • Other Relevant Links

Blocked by Islandora/documentation#57

What does this Pull Request do?

Provides a set of Camel routes to orchestrate calls to Milliner and Gemini in response to Drupal events.

What's new?

A lot. A new feature for Alpaca. Quite a few routes with some nice error handling techniques. And tests covering the basic routing flows.

How should this be tested?

To install these changes, start with an existing vagrant that has Alpaca running in Karaf. Then perform the following:

  • cd ~/Alpaca
  • ./gradlew install
  • Then log into the Karaf console with /opt/karaf/bin/client
  • feature:repo-refresh file:/home/ubuntu/Alpaca/karaf/build/resources/main/features.xml
  • feature:install islandora-indexing-fcrepo

You can test it by creating, updating, and deleting an entity in Drupal and checking the results in Fedora.

  • Create an entity in Drupal. Let's say it has a uri of http://localhost:8000/fedora_resource/1.
  • curl -i -H "Authorization: Bearer islandora" "http://localhost:8000/gemini/drupal/fedora_resource/1" should return 200 with the path in Fedora. I received cf/46/e4/cd/cf46e4cd-85b1-4430-8a8b-3b25809e5bf4.
  • curl -i -H "Authorization: Bearer islandora" "http://locahost:8080/fcrepo/rest/cf/46/e4/cd/cf46e4cd-85b1-4430-8a8b-3b25809e5bf4" should return its RDF metadata in Turtle format.
  • Update the entity in Drupal
  • curl -i -H "Authorization: Bearer islandora" "http://locahost:8080/fcrepo/rest/cf/46/e4/cd/cf46e4cd-85b1-4430-8a8b-3b25809e5bf4" should return updated metadata.
  • Delete the entity in Drupal
  • curl -i -H "Authorization: Bearer islandora" "http://localhost:8000/gemini/drupal/fedora_resource/1" should return an empty 404
  • curl -i -H "Authorization: Bearer islandora" "http://locahost:8080/fcrepo/rest/cf/46/e4/cd/cf46e4cd-85b1-4430-8a8b-3b25809e5bf4" should return a 410 with a message about the tombstone.

Interested parties

@Islandora-CLAW/committers

@codecov
Copy link

codecov bot commented May 3, 2017

Codecov Report

Merging #39 into master will increase coverage by 12.98%.
The diff coverage is 88.39%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master      #39       +/-   ##
=============================================
+ Coverage     71.18%   84.16%   +12.98%     
- Complexity        3       29       +26     
=============================================
  Files             2        6        +4     
  Lines            59      240      +181     
  Branches          0        1        +1     
=============================================
+ Hits             42      202      +160     
- Misses           17       37       +20     
- Partials          0        1        +1
Impacted Files Coverage Δ Complexity Δ
.../ca/islandora/alpaca/indexing/fcrepo/AS2Actor.java 71.42% <71.42%> (ø) 3 <3> (?)
...dora/alpaca/indexing/fcrepo/FcrepoIndexerBean.java 80% <80%> (ø) 13 <13> (?)
.../ca/islandora/alpaca/indexing/fcrepo/AS2Event.java 84.61% <84.61%> (ø) 7 <7> (?)
...slandora/alpaca/indexing/fcrepo/FcrepoIndexer.java 96.7% <96.7%> (ø) 3 <3> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82c487d...94b15b8. Read the comment docs.

@dannylamb
Copy link
Contributor Author

@Islandora-CLAW/committers Ok, we're building now (thanks @whikloj), so can someone verify that this will deploy on a fresh Karaf?

@whikloj
Copy link
Member

whikloj commented May 4, 2017

vagrant up

@whikloj
Copy link
Member

whikloj commented May 4, 2017

Good show old boy! Works as expected. I'll leave it here for tonight and merge in the AM if there are no issues raised.

@whikloj whikloj merged commit 9ca45c8 into Islandora:master May 4, 2017
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.

2 participants