From 33b07daeca9da437af359a9168b5d339edc0cc73 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Thu, 7 Mar 2019 11:07:44 -0600 Subject: [PATCH 1/3] Changes to work with Fedora-Camel 5.0.0 --- .gitignore | 6 + .../pom.xml | 2 +- blueprint/fcrepo-fixity-blueprint/pom.xml | 2 +- .../fcrepo-indexing-solr-blueprint/pom.xml | 2 +- .../pom.xml | 2 +- blueprint/fcrepo-ldpath-blueprint/pom.xml | 2 +- blueprint/fcrepo-reindexing-blueprint/pom.xml | 2 +- .../fcrepo-serialization-blueprint/pom.xml | 2 +- blueprint/pom.xml | 2 +- fcrepo-audit-triplestore/pom.xml | 2 +- .../test/resources/event_audit_resource.json | 66 ++++---- .../test/resources/event_audit_update.json | 67 ++++---- .../test/resources/event_delete_binary.json | 66 ++++---- .../test/resources/event_delete_resource.json | 68 ++++---- fcrepo-fixity/pom.xml | 6 +- .../camel/fixity/integration/RouteIT.java | 10 +- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + fcrepo-indexing-solr/pom.xml | 2 +- .../fcrepo/camel/indexing/solr/RouteTest.java | 4 +- .../test/resources/event_delete_resource.json | 66 ++++---- fcrepo-indexing-triplestore/pom.xml | 5 +- .../camel/indexing/triplestore/RouteTest.java | 1 + .../integration/RouteDeleteIT.java | 4 +- .../integration/RouteUpdateIT.java | 13 +- .../triplestore/integration/TestUtils.java | 81 ++++++---- .../OSGI-INF/blueprint/blueprint-test.xml | 4 +- .../test/resources/event_delete_resource.json | 68 ++++---- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + fcrepo-ldpath/pom.xml | 2 +- .../org/fcrepo/camel/ldpath/RouteTest.java | 5 +- .../camel/ldpath/RouteWithFunctionsTest.java | 2 +- fcrepo-reindexing/pom.xml | 16 +- .../camel/reindexing/integration/RouteIT.java | 27 +++- .../OSGI-INF/blueprint/blueprint-test.xml | 4 +- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + fcrepo-serialization/pom.xml | 5 +- .../serialization/integration/RouteIT.java | 6 +- .../OSGI-INF/blueprint/blueprint-test.xml | 10 ++ .../src/test/resources/event.json | 67 ++++---- .../test/resources/event_delete_resource.json | 68 ++++---- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + fcrepo-service-activemq/pom.xml | 10 +- .../camel/service/activemq/KarafIT.java | 49 ++++-- .../camel/service/activemq/RouteIT.java | 38 ++++- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + fcrepo-service-camel/pom.xml | 9 +- .../org/fcrepo/camel/service/KarafIT.java | 29 +++- .../org/fcrepo/camel/service/RouteIT.java | 14 +- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + fcrepo-service-ldcache-file/pom.xml | 2 +- pom.xml | 24 ++- toolbox-features/pom.xml | 9 +- .../src/test/resources/jetty-test.xml | 150 ++++++++++++++++++ .../src/test/resources/jetty-users.properties | 3 + 60 files changed, 1617 insertions(+), 405 deletions(-) create mode 100644 fcrepo-fixity/src/test/resources/jetty-test.xml create mode 100644 fcrepo-fixity/src/test/resources/jetty-users.properties create mode 100644 fcrepo-indexing-triplestore/src/test/resources/jetty-test.xml create mode 100644 fcrepo-indexing-triplestore/src/test/resources/jetty-users.properties create mode 100644 fcrepo-reindexing/src/test/resources/jetty-test.xml create mode 100644 fcrepo-reindexing/src/test/resources/jetty-users.properties create mode 100644 fcrepo-serialization/src/test/resources/jetty-test.xml create mode 100644 fcrepo-serialization/src/test/resources/jetty-users.properties create mode 100644 fcrepo-service-activemq/src/test/resources/jetty-test.xml create mode 100644 fcrepo-service-activemq/src/test/resources/jetty-users.properties create mode 100644 fcrepo-service-camel/src/test/resources/jetty-test.xml create mode 100644 fcrepo-service-camel/src/test/resources/jetty-users.properties create mode 100644 toolbox-features/src/test/resources/jetty-test.xml create mode 100644 toolbox-features/src/test/resources/jetty-users.properties diff --git a/.gitignore b/.gitignore index fa5eba6c..0ca80d73 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,12 @@ fcrepo4-data/ *transaction.log *~ +# Eclipse files +**/.settings +**/.classpath +**/.checkstyle +**/.project + # Mobile Tools for Java (J2ME) .mtj.tmp/ diff --git a/blueprint/fcrepo-audit-triplestore-blueprint/pom.xml b/blueprint/fcrepo-audit-triplestore-blueprint/pom.xml index d5356f65..50b868b1 100644 --- a/blueprint/fcrepo-audit-triplestore-blueprint/pom.xml +++ b/blueprint/fcrepo-audit-triplestore-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-audit-triplestore-blueprint diff --git a/blueprint/fcrepo-fixity-blueprint/pom.xml b/blueprint/fcrepo-fixity-blueprint/pom.xml index fdb74353..dc50fda4 100644 --- a/blueprint/fcrepo-fixity-blueprint/pom.xml +++ b/blueprint/fcrepo-fixity-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-fixity-blueprint diff --git a/blueprint/fcrepo-indexing-solr-blueprint/pom.xml b/blueprint/fcrepo-indexing-solr-blueprint/pom.xml index f6c50440..3695510a 100644 --- a/blueprint/fcrepo-indexing-solr-blueprint/pom.xml +++ b/blueprint/fcrepo-indexing-solr-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-indexing-solr-blueprint diff --git a/blueprint/fcrepo-indexing-triplestore-blueprint/pom.xml b/blueprint/fcrepo-indexing-triplestore-blueprint/pom.xml index c5a65df0..253785b5 100644 --- a/blueprint/fcrepo-indexing-triplestore-blueprint/pom.xml +++ b/blueprint/fcrepo-indexing-triplestore-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-indexing-triplestore-blueprint diff --git a/blueprint/fcrepo-ldpath-blueprint/pom.xml b/blueprint/fcrepo-ldpath-blueprint/pom.xml index 92f5de30..b38b722a 100644 --- a/blueprint/fcrepo-ldpath-blueprint/pom.xml +++ b/blueprint/fcrepo-ldpath-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-ldpath-blueprint diff --git a/blueprint/fcrepo-reindexing-blueprint/pom.xml b/blueprint/fcrepo-reindexing-blueprint/pom.xml index 8d241532..665fc80c 100644 --- a/blueprint/fcrepo-reindexing-blueprint/pom.xml +++ b/blueprint/fcrepo-reindexing-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-reindexing-blueprint diff --git a/blueprint/fcrepo-serialization-blueprint/pom.xml b/blueprint/fcrepo-serialization-blueprint/pom.xml index 84340bf3..1e05a566 100644 --- a/blueprint/fcrepo-serialization-blueprint/pom.xml +++ b/blueprint/fcrepo-serialization-blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox-blueprint org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-serialization-blueprint diff --git a/blueprint/pom.xml b/blueprint/pom.xml index eb0fa77c..47d03ed4 100644 --- a/blueprint/pom.xml +++ b/blueprint/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-camel-toolbox-blueprint diff --git a/fcrepo-audit-triplestore/pom.xml b/fcrepo-audit-triplestore/pom.xml index b6670313..fdc02c99 100644 --- a/fcrepo-audit-triplestore/pom.xml +++ b/fcrepo-audit-triplestore/pom.xml @@ -6,7 +6,7 @@ org.fcrepo.camel fcrepo-camel-toolbox - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-audit-triplestore diff --git a/fcrepo-audit-triplestore/src/test/resources/event_audit_resource.json b/fcrepo-audit-triplestore/src/test/resources/event_audit_resource.json index 16526359..74e414b2 100644 --- a/fcrepo-audit-triplestore/src/test/resources/event_audit_resource.json +++ b/fcrepo-audit-triplestore/src/test/resources/event_audit_resource.json @@ -1,36 +1,38 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/audit/1234" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a11", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Create" ], + "name": "create resource", + "published": "2016-05-19T17:17:40-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/audit/1234" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "http://fedora.info/definitions/v4/event#ResourceCreation" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] } + diff --git a/fcrepo-audit-triplestore/src/test/resources/event_audit_update.json b/fcrepo-audit-triplestore/src/test/resources/event_audit_update.json index d0c1c128..cf20c7df 100644 --- a/fcrepo-audit-triplestore/src/test/resources/event_audit_update.json +++ b/fcrepo-audit-triplestore/src/test/resources/event_audit_update.json @@ -1,36 +1,37 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/audit" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a12", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Update" ], + "name": "update resource", + "published": "2016-05-19T17:17:41-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/audit" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "http://fedora.info/definitions/v4/event#ResourceModification" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] -} + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] +} \ No newline at end of file diff --git a/fcrepo-audit-triplestore/src/test/resources/event_delete_binary.json b/fcrepo-audit-triplestore/src/test/resources/event_delete_binary.json index d0be2552..601f1e43 100644 --- a/fcrepo-audit-triplestore/src/test/resources/event_delete_binary.json +++ b/fcrepo-audit-triplestore/src/test/resources/event_delete_binary.json @@ -1,36 +1,36 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/file1" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a13", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Binary" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Delete" ], + "name": "delete resource", + "published": "2016-05-19T17:17:42-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/file1" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "https://www.w3.org/ns/activitystreams#Delete" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] -} + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Binary" , + "http://www.w3.org/ns/ldp#NonRDFSource" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] +} \ No newline at end of file diff --git a/fcrepo-audit-triplestore/src/test/resources/event_delete_resource.json b/fcrepo-audit-triplestore/src/test/resources/event_delete_resource.json index d2857b90..c67545fe 100644 --- a/fcrepo-audit-triplestore/src/test/resources/event_delete_resource.json +++ b/fcrepo-audit-triplestore/src/test/resources/event_delete_resource.json @@ -1,37 +1,37 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/auditions/1234" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a14", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" , - "http://example.org/CustomType" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Delete" ], + "name": "delete resource", + "published": "2016-05-19T17:17:43-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/auditions/1234" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "https://www.w3.org/ns/activitystreams#Delete" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] -} + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] +} \ No newline at end of file diff --git a/fcrepo-fixity/pom.xml b/fcrepo-fixity/pom.xml index 7254f748..b71ea288 100644 --- a/fcrepo-fixity/pom.xml +++ b/fcrepo-fixity/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-fixity @@ -69,7 +69,6 @@ org.apache.activemq activemq-camel - ${activemq.version} test @@ -181,13 +180,14 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - + ${project.build.directory}/fcrepo.war /fcrepo diff --git a/fcrepo-fixity/src/test/java/org/fcrepo/camel/fixity/integration/RouteIT.java b/fcrepo-fixity/src/test/java/org/fcrepo/camel/fixity/integration/RouteIT.java index 3ba58557..3fdad07b 100644 --- a/fcrepo-fixity/src/test/java/org/fcrepo/camel/fixity/integration/RouteIT.java +++ b/fcrepo-fixity/src/test/java/org/fcrepo/camel/fixity/integration/RouteIT.java @@ -53,6 +53,9 @@ public class RouteIT extends CamelBlueprintTestSupport { private static final String REPOSITORY = "http://fedora.info/definitions/v4/repository#"; + private static String FEDORA_USERNAME = "fedoraAdmin"; + private static String FEDORA_PASSWORD = "fedoraAdmin"; + @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @@ -66,7 +69,8 @@ public class RouteIT extends CamelBlueprintTestSupport { @Override protected void doPreSetup() throws Exception { final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); - final FcrepoClient client = client().throwExceptionOnFailure().build(); + final FcrepoClient client = client().throwExceptionOnFailure() + .credentials(FEDORA_USERNAME, FEDORA_PASSWORD).build(); final FcrepoResponse res = client.post(URI.create("http://localhost:" + webPort + "/fcrepo/rest")) .body(loadResourceAsStream(binary), "text/plain").perform(); fullPath = res.getLocation().toString(); @@ -109,7 +113,8 @@ protected void addServicesOnStartup(final Map + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/fcrepo-fixity/src/test/resources/jetty-users.properties b/fcrepo-fixity/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/fcrepo-fixity/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin diff --git a/fcrepo-indexing-solr/pom.xml b/fcrepo-indexing-solr/pom.xml index 3cc5e666..ba422b5c 100644 --- a/fcrepo-indexing-solr/pom.xml +++ b/fcrepo-indexing-solr/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-indexing-solr diff --git a/fcrepo-indexing-solr/src/test/java/org/fcrepo/camel/indexing/solr/RouteTest.java b/fcrepo-indexing-solr/src/test/java/org/fcrepo/camel/indexing/solr/RouteTest.java index 91f3a60b..62c23f5a 100644 --- a/fcrepo-indexing-solr/src/test/java/org/fcrepo/camel/indexing/solr/RouteTest.java +++ b/fcrepo-indexing-solr/src/test/java/org/fcrepo/camel/indexing/solr/RouteTest.java @@ -52,7 +52,7 @@ */ public class RouteTest extends CamelBlueprintTestSupport { - private final String EVENT_NS = "http://fedora.info/definitions/v4/event#"; + private final String EVENT_NS = "https://www.w3.org/ns/activitystreams#"; private final String INDEXABLE = "http://fedora.info/definitions/v4/indexing#Indexable"; @EndpointInject(uri = "mock:result") @@ -110,7 +110,7 @@ protected Properties useOverridePropertiesWithPropertiesComponent() { @Test public void testEventTypeRouter() throws Exception { - final List eventTypes = asList(EVENT_NS + "ResourceDeletion"); + final List eventTypes = asList(EVENT_NS + "Delete"); context.getRouteDefinition("FcrepoSolrRouter").adviceWith(context, new AdviceWithRouteBuilder() { @Override diff --git a/fcrepo-indexing-solr/src/test/resources/event_delete_resource.json b/fcrepo-indexing-solr/src/test/resources/event_delete_resource.json index d2857b90..abaff3e5 100644 --- a/fcrepo-indexing-solr/src/test/resources/event_delete_resource.json +++ b/fcrepo-indexing-solr/src/test/resources/event_delete_resource.json @@ -1,37 +1,39 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18", + "type" : [ + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Delete" ], + "name": "delete resource", + "published": "2016-05-19T17:17:39-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - "id" : "http://localhost/rest/auditions/1234" , - "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" , - "http://example.org/CustomType" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "object" : { + "id" : "http://localhost/rest/auditions/1234" , + "isPartOf" : "http://localhost/rest" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "https://www.w3.org/ns/activitystreams#Delete" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer", + "http://example.org/CustomType" ] + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] } diff --git a/fcrepo-indexing-triplestore/pom.xml b/fcrepo-indexing-triplestore/pom.xml index 8a541976..a2b7bf86 100644 --- a/fcrepo-indexing-triplestore/pom.xml +++ b/fcrepo-indexing-triplestore/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-indexing-triplestore @@ -188,13 +188,14 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - + ${project.build.directory}/fcrepo.war /fcrepo diff --git a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java index 398bdbba..839a75c1 100644 --- a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java +++ b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java @@ -91,6 +91,7 @@ protected Properties useOverridePropertiesWithPropertiesComponent() { props.put("filter.containers", auditContainer); props.put("input.stream", "seda:foo"); props.put("reindex.stream", "seda:bar"); + props.put("triplestore.reindex.stream", "seda:reindex"); return props; } diff --git a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteDeleteIT.java b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteDeleteIT.java index 1acf85a5..470058ef 100644 --- a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteDeleteIT.java +++ b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteDeleteIT.java @@ -21,8 +21,8 @@ import static com.jayway.awaitility.Awaitility.await; import static org.apache.camel.util.ObjectHelper.loadResourceAsStream; import static org.apache.jena.rdf.model.ModelFactory.createDefaultModel; +import static org.fcrepo.camel.indexing.triplestore.integration.TestUtils.createClient; import static org.fcrepo.camel.indexing.triplestore.integration.TestUtils.getEvent; -import static org.fcrepo.client.FcrepoClient.client; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.slf4j.LoggerFactory.getLogger; @@ -81,7 +81,7 @@ protected void doPreSetup() throws Exception { @Before public void setUpFuseki() throws Exception { - final FcrepoClient client = client().throwExceptionOnFailure().build(); + final FcrepoClient client = createClient(); final FcrepoResponse res = client.post(URI.create("http://localhost:" + FCREPO_PORT + "/fcrepo/rest")) .body(loadResourceAsStream("container.ttl"), "text/turtle").perform(); fullPath = res.getLocation().toString(); diff --git a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteUpdateIT.java b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteUpdateIT.java index a935c837..6bc67e7b 100644 --- a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteUpdateIT.java +++ b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/RouteUpdateIT.java @@ -21,8 +21,8 @@ import static com.jayway.awaitility.Awaitility.await; import static org.apache.camel.util.ObjectHelper.loadResourceAsStream; import static org.apache.jena.rdf.model.ModelFactory.createDefaultModel; +import static org.fcrepo.camel.indexing.triplestore.integration.TestUtils.createClient; import static org.fcrepo.camel.indexing.triplestore.integration.TestUtils.getEvent; -import static org.fcrepo.client.FcrepoClient.client; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.slf4j.LoggerFactory.getLogger; @@ -78,14 +78,16 @@ public class RouteUpdateIT extends CamelBlueprintTestSupport { @Override protected void doPreSetup() throws Exception { - final FcrepoClient client = client().throwExceptionOnFailure().build(); - final FcrepoResponse res = client.post(URI.create("http://localhost:" + FCREPO_PORT + "/fcrepo/rest")) - .body(loadResourceAsStream("indexable.ttl"), "text/turtle").perform(); - fullPath = res.getLocation().toString(); + } @Before public void setUpFuseki() throws Exception { + final FcrepoClient client = createClient(); + final FcrepoResponse res = client.post(URI.create("http://localhost:" + FCREPO_PORT + "/fcrepo/rest")) + .body(loadResourceAsStream("indexable.ttl"), "text/turtle").perform(); + fullPath = res.getLocation().toString(); + logger.info("Starting EmbeddedFusekiServer on port {}", FUSEKI_PORT); final Dataset ds = new DatasetImpl(createDefaultModel()); server = FusekiEmbeddedServer.create().setPort(parseInt(FUSEKI_PORT)) @@ -123,6 +125,7 @@ protected Properties useOverridePropertiesWithPropertiesComponent() { props.put("fcrepo.baseUrl", "http://localhost:" + FCREPO_PORT + "/fcrepo/rest"); props.put("jms.brokerUrl", "tcp://localhost:" + jmsPort); props.put("input.stream", "direct:start"); + props.put("triplestore.reindex.stream", "direct:reindex"); return props; } diff --git a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/TestUtils.java b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/TestUtils.java index a1dba90e..18d5470f 100644 --- a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/TestUtils.java +++ b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/integration/TestUtils.java @@ -29,6 +29,9 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; +import org.fcrepo.client.FcrepoClient; + +import static org.fcrepo.client.FcrepoClient.client; /** * Utility functions for the integration tests @@ -38,6 +41,9 @@ */ public class TestUtils { + private static String FEDORA_USERNAME = "fedoraAdmin"; + private static String FEDORA_PASSWORD = "fedoraAdmin"; + /** * Format a Sparql-update for the provided subject. * @@ -76,37 +82,41 @@ public static InputStream httpGet(final String url) throws Exception { * @return the event message as JSON */ public static String getEvent(final String subject, final String eventType) { - return "{\"@context\" : {" + - "\"prov\" : \"http://www.w3.org/ns/prov#\" ," + - "\"foaf\" : \"http://xmlns.com/foaf/0.1/\" ," + - "\"dcterms\" : \"http://purl.org/dc/terms/\" ," + - "\"xsd\" : \"http://www.w3.org/2001/XMLSchema#\" ," + - "\"type\" : \"@type\" , " + - "\"id\" : \"@id\" ," + - "\"atTime\" : { \"@id\" : \"prov:atTime\", \"@type\" : \"xsd:dateTime\" } ," + - "\"identifier\" : { \"@id\" : \"dcterms:identifier\" , \"@type\" : \"@id\" } ," + - "\"isPartOf\" : { \"@id\" : \"dcterms:isPartOf\", \"@type\" : \"@id\" } ," + - "\"name\" : { \"@id\" : \"foaf:name\", \"@type\" : \"xsd:string\" } ," + - "\"wasAttributedTo\" : { \"@id\" : \"prov:wasAttributedTo\", \"@type\" : \"@id\" } ," + - "\"wasGeneratedBy\" : { \"@id\" : \"prov:wasGeneratedBy\", \"@type\" : \"@id\" }" + - "} ," + - "\"id\" : \"" + subject + "\" ," + - "\"type\" : [ " + - "\"http://www.w3.org/ns/prov#Entity\" ," + - "\"http://fedora.info/definitions/v4/repository#Resource\" ," + - "\"http://fedora.info/definitions/v4/repository#Container\" ] ," + - "\"wasGeneratedBy\" : {" + - "\"type\" : [" + - "\"http://www.w3.org/ns/prov#Activity\" ," + - "\"" + eventType + "\" ] ," + - "\"identifier\" : \"urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18\" ," + - "\"atTime\" : \"2016-05-19T17:17:39-04:00Z\" } ," + - "\"wasAttributedTo\" : [" + - "{ \"type\" : \"http://www.w3.org/ns/prov#Person\" ," + - "\"name\" : \"fedo raAdmin\" }," + - "{ \"type\" : \"http://www.w3.org/ns/prov#SoftwareAgent\" ," + - "\"name\" : \"CLAW client/1.0\" } ]" + - "}"; + return "{\n" + + "\"id\": \"urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18\", \n" + + "\"type\" : [ \"http://www.w3.org/ns/prov#Activity\" ,\n" + + " \"" + eventType + "\" ],\n" + + "\"name\": \"resource event\",\n" + + " \"published\": \"2016-05-19T17:17:43-04:00Z\",\n" + + " \"actor\": [{\n" + + " \"type\": [\"Person\"],\n" + + " \"id\": \"info:fedora/fedoraAdmin\"\n" + + "}, {\n" + + " \"type\": [\"Application\"],\n" + + " \"name\": \"CLAW client/1.0\"\n" + + "}],\n" + + " \n" + + "\"object\" : {\n" + + " \"id\" : \"" + subject + "\" ,\n" + + " \"type\" : [\n" + + " \"http://www.w3.org/ns/prov#Entity\" ,\n" + + " \"http://fedora.info/definitions/v4/repository#Resource\" ,\n" + + " \"http://fedora.info/definitions/v4/repository#Container\" ,\n" + + " \"http://www.w3.org/ns/ldp#RDFSource\",\n" + + " \"http://www.w3.org/ns/ldp#BasicContainer\" ],\n" + + " \"isPartOf\" : \"http://localhost/rest\"\n" + + "},\n" + + " \n" + + "\"@context\": [\"https://www.w3.org/ns/activitystreams\", {\n" + + " \"prov\": \"http://www.w3.org/ns/prov#\",\n" + + " \"dcterms\": \"http://purl.org/dc/terms/\",\n" + + " \"type\": \"@type\",\n" + + " \"id\": \"@id\",\n" + + " \"isPartOf\": {\n" + + " \"@id\": \"dcterms:isPartOf\",\n" + + " \"@type\": \"@id\"\n" + + "}}]\n" + + "}"; } /** @@ -158,6 +168,15 @@ public Integer call() throws Exception { }; } + /** + * Create a new FcrepoClient instance with authentication. + * @return the newly created client + */ + public static FcrepoClient createClient() { + return client().throwExceptionOnFailure() + .credentials(FEDORA_USERNAME, FEDORA_PASSWORD).build(); + } + private TestUtils() { // prevent instantiation } diff --git a/fcrepo-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml b/fcrepo-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml index 836f1d42..8346c9f5 100644 --- a/fcrepo-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml +++ b/fcrepo-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml @@ -11,8 +11,8 @@ - - + + diff --git a/fcrepo-indexing-triplestore/src/test/resources/event_delete_resource.json b/fcrepo-indexing-triplestore/src/test/resources/event_delete_resource.json index 46677d4a..45c20752 100644 --- a/fcrepo-indexing-triplestore/src/test/resources/event_delete_resource.json +++ b/fcrepo-indexing-triplestore/src/test/resources/event_delete_resource.json @@ -1,37 +1,37 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/some/resource" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" , - "http://example.org/CustomType" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Delete" ], + "name": "delete resource", + "published": "2016-05-19T17:17:43-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/some/resource" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "https://www.w3.org/ns/activitystreams#Delete" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] -} + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] +} \ No newline at end of file diff --git a/fcrepo-indexing-triplestore/src/test/resources/jetty-test.xml b/fcrepo-indexing-triplestore/src/test/resources/jetty-test.xml new file mode 100644 index 00000000..77396270 --- /dev/null +++ b/fcrepo-indexing-triplestore/src/test/resources/jetty-test.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/fcrepo-indexing-triplestore/src/test/resources/jetty-users.properties b/fcrepo-indexing-triplestore/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/fcrepo-indexing-triplestore/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin diff --git a/fcrepo-ldpath/pom.xml b/fcrepo-ldpath/pom.xml index d6f7109f..fe9b8803 100644 --- a/fcrepo-ldpath/pom.xml +++ b/fcrepo-ldpath/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-ldpath diff --git a/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteTest.java b/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteTest.java index 16af598d..2b02e53e 100644 --- a/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteTest.java +++ b/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteTest.java @@ -22,9 +22,6 @@ import static org.apache.camel.Exchange.HTTP_URI; import static org.apache.camel.util.ObjectHelper.loadResourceAsStream; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.io.File; import java.util.Dictionary; import java.util.HashMap; @@ -141,7 +138,7 @@ public void testOptions() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("language:simple:resource:classpath:org/fcrepo/camel/ldpath/options.ttl"); } }); context.start(); diff --git a/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteWithFunctionsTest.java b/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteWithFunctionsTest.java index fd84996f..98450abd 100644 --- a/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteWithFunctionsTest.java +++ b/fcrepo-ldpath/src/test/java/org/fcrepo/camel/ldpath/RouteWithFunctionsTest.java @@ -140,7 +140,7 @@ public void testOptions() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("language:simple:resource:classpath:org/fcrepo/camel/ldpath/options.ttl"); } }); context.start(); diff --git a/fcrepo-reindexing/pom.xml b/fcrepo-reindexing/pom.xml index 925b8d3d..18e7b738 100644 --- a/fcrepo-reindexing/pom.xml +++ b/fcrepo-reindexing/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-reindexing @@ -163,6 +163,7 @@ + org.eclipse.jetty jetty-maven-plugin @@ -177,10 +178,6 @@ fcrepo.dynamic.reindexing.port ${fcrepo.dynamic.reindexing.port} - - fcrepo.dynamic.test.port - ${fcrepo.dynamic.test.port} - fcrepo.dynamic.jms.port ${fcrepo.dynamic.jms.port} @@ -208,16 +205,17 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - - ${project.build.directory}/fcrepo.war - /fcrepo - + + ${project.build.directory}/fcrepo.war + /fcrepo + diff --git a/fcrepo-reindexing/src/test/java/org/fcrepo/camel/reindexing/integration/RouteIT.java b/fcrepo-reindexing/src/test/java/org/fcrepo/camel/reindexing/integration/RouteIT.java index 9eaac916..60717d0b 100644 --- a/fcrepo-reindexing/src/test/java/org/fcrepo/camel/reindexing/integration/RouteIT.java +++ b/fcrepo-reindexing/src/test/java/org/fcrepo/camel/reindexing/integration/RouteIT.java @@ -38,7 +38,10 @@ import org.apache.camel.test.blueprint.CamelBlueprintTestSupport; import org.apache.camel.util.KeyValueHolder; import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; @@ -57,13 +60,23 @@ public class RouteIT extends CamelBlueprintTestSupport { private static final Logger LOGGER = getLogger(RouteIT.class); + private static final String FEDORA_AUTH_USERNAME = "fedoraAdmin"; + private static final String FEDORA_AUTH_PASSWORD = "fedoraAdmin"; + @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @Produce(uri = "direct:reindex") protected ProducerTemplate template; - private String fullPath = ""; + private final String fullPath = ""; + + private static final BasicCredentialsProvider provider = new BasicCredentialsProvider(); + + public RouteIT() { + provider.setCredentials(AuthScope.ANY, + new UsernamePasswordCredentials(FEDORA_AUTH_USERNAME, FEDORA_AUTH_PASSWORD)); + } @Override protected String getBlueprintDescriptor() { @@ -77,7 +90,6 @@ public void doPreSetup() throws Exception { final String basePath = "http://localhost:" + webPort + "/fcrepo/rest"; final String subPath = post(basePath); - final String jmsPort = System.getProperty("fcrepo.dynamic.jms.port", "61616"); for (int i = 0; i < 10; ++i) { post(basePath); @@ -92,10 +104,10 @@ protected void addServicesOnStartup(final Map - - + + diff --git a/fcrepo-reindexing/src/test/resources/jetty-test.xml b/fcrepo-reindexing/src/test/resources/jetty-test.xml new file mode 100644 index 00000000..77396270 --- /dev/null +++ b/fcrepo-reindexing/src/test/resources/jetty-test.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/fcrepo-reindexing/src/test/resources/jetty-users.properties b/fcrepo-reindexing/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/fcrepo-reindexing/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin diff --git a/fcrepo-serialization/pom.xml b/fcrepo-serialization/pom.xml index c5a11f85..d453e5cb 100644 --- a/fcrepo-serialization/pom.xml +++ b/fcrepo-serialization/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-serialization @@ -207,13 +207,14 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - + ${project.build.directory}/fcrepo.war /fcrepo diff --git a/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/integration/RouteIT.java b/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/integration/RouteIT.java index e45937dc..1253c490 100644 --- a/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/integration/RouteIT.java +++ b/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/integration/RouteIT.java @@ -55,6 +55,9 @@ public class RouteIT extends CamelBlueprintTestSupport { private static final String auditContainer = "/audit"; + private static String FEDORA_USERNAME = "fedoraAdmin"; + private static String FEDORA_PASSWORD = "fedoraAdmin"; + @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @@ -66,7 +69,8 @@ public class RouteIT extends CamelBlueprintTestSupport { @Override protected void doPreSetup() throws Exception { - final FcrepoClient client = client().throwExceptionOnFailure().build(); + final FcrepoClient client = client().throwExceptionOnFailure() + .credentials(FEDORA_USERNAME, FEDORA_PASSWORD).build(); final FcrepoResponse res = client.post(URI.create("http://localhost:" + FCREPO_PORT + "/fcrepo/rest")) .body(loadResourceAsStream("indexable.ttl"), "text/turtle").perform(); fullPath = res.getLocation().toString(); diff --git a/fcrepo-serialization/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml b/fcrepo-serialization/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml index a9e266c9..368ed6da 100644 --- a/fcrepo-serialization/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml +++ b/fcrepo-serialization/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml @@ -12,6 +12,9 @@ + + + @@ -27,6 +30,13 @@ + + + + + + + org.fcrepo.camel.serialization diff --git a/fcrepo-serialization/src/test/resources/event.json b/fcrepo-serialization/src/test/resources/event.json index 2af73d64..9a98443c 100644 --- a/fcrepo-serialization/src/test/resources/event.json +++ b/fcrepo-serialization/src/test/resources/event.json @@ -1,36 +1,37 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/path/to/resource" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Create" ], + "name": "delete resource", + "published": "2016-05-19T17:17:43-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/path/to/resource" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "http://fedora.info/definitions/v4/event#ResourceCreation" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] -} + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] +} \ No newline at end of file diff --git a/fcrepo-serialization/src/test/resources/event_delete_resource.json b/fcrepo-serialization/src/test/resources/event_delete_resource.json index d2857b90..9cfb4776 100644 --- a/fcrepo-serialization/src/test/resources/event_delete_resource.json +++ b/fcrepo-serialization/src/test/resources/event_delete_resource.json @@ -1,37 +1,37 @@ { - "@context" : { - "prov" : "http://www.w3.org/ns/prov#" , - "foaf" : "http://xmlns.com/foaf/0.1/" , - "dcterms" : "http://purl.org/dc/terms/" , - "xsd" : "http://www.w3.org/2001/XMLSchema#" , - - "type" : "@type" , - "id" : "@id" , - - "atTime" : { "@id" : "prov:atTime", "@type" : "xsd:dateTime" } , - "identifier" : { "@id" : "dcterms:identifier" , "@type" : "@id" } , - "isPartOf" : { "@id" : "dcterms:isPartOf", "@type" : "@id" } , - "name" : { "@id" : "foaf:name", "@type" : "xsd:string" } , - "wasAttributedTo" : { "@id" : "prov:wasAttributedTo", "@type" : "@id" } , - "wasGeneratedBy" : { "@id" : "prov:wasGeneratedBy", "@type" : "@id" } - } , - - "id" : "http://localhost/rest/auditions/1234" , + "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18", "type" : [ - "http://www.w3.org/ns/prov#Entity" , - "http://fedora.info/definitions/v4/repository#Resource" , - "http://fedora.info/definitions/v4/repository#Container" , - "http://example.org/CustomType" ] , - "isPartOf" : "http://localhost/rest" , - "wasGeneratedBy" : { + "http://www.w3.org/ns/prov#Activity" , + "https://www.w3.org/ns/activitystreams#Delete" ], + "name": "delete resource", + "published": "2016-05-19T17:17:43-04:00Z", + "actor": [{ + "type": ["Person"], + "id": "info:fedora/fedoraAdmin" + }, { + "type": ["Application"], + "name": "CLAW client/1.0" + }], + + "object" : { + "id" : "http://localhost/rest/auditions/1234" , "type" : [ - "http://www.w3.org/ns/prov#Activity" , - "https://www.w3.org/ns/activitystreams#Delete" ] , - "identifier" : "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18" , - "atTime" : "2016-05-19T17:17:39-04:00Z" } , - "wasAttributedTo" : [ - { "type" : "http://www.w3.org/ns/prov#Person" , - "name" : "fedo raAdmin" }, - { "type" : "http://www.w3.org/ns/prov#SoftwareAgent" , - "name" : "CLAW client/1.0" } ] -} + "http://www.w3.org/ns/prov#Entity" , + "http://fedora.info/definitions/v4/repository#Resource" , + "http://fedora.info/definitions/v4/repository#Container" , + "http://www.w3.org/ns/ldp#RDFSource", + "http://www.w3.org/ns/ldp#BasicContainer" ], + "isPartOf" : "http://localhost/rest" + }, + + "@context": ["https://www.w3.org/ns/activitystreams", { + "prov": "http://www.w3.org/ns/prov#", + "dcterms": "http://purl.org/dc/terms/", + "type": "@type", + "id": "@id", + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + } + }] +} \ No newline at end of file diff --git a/fcrepo-serialization/src/test/resources/jetty-test.xml b/fcrepo-serialization/src/test/resources/jetty-test.xml new file mode 100644 index 00000000..77396270 --- /dev/null +++ b/fcrepo-serialization/src/test/resources/jetty-test.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/fcrepo-serialization/src/test/resources/jetty-users.properties b/fcrepo-serialization/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/fcrepo-serialization/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin diff --git a/fcrepo-service-activemq/pom.xml b/fcrepo-service-activemq/pom.xml index b1d627a3..8931ca1f 100644 --- a/fcrepo-service-activemq/pom.xml +++ b/fcrepo-service-activemq/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-service-activemq @@ -156,7 +156,6 @@ org.ops4j.pax.exam maven-paxexam-plugin - ${paxexam.plugin.version} generate-config @@ -259,10 +258,6 @@ fcrepo.dynamic.reindexing.port ${fcrepo.dynamic.reindexing.port} - - fcrepo.dynamic.test.port - ${fcrepo.dynamic.test.port} - fcrepo.dynamic.jms.port ${fcrepo.dynamic.jms.port} @@ -290,13 +285,14 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - + ${project.build.directory}/fcrepo.war /fcrepo diff --git a/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/KarafIT.java b/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/KarafIT.java index 70071f8c..94a138ce 100644 --- a/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/KarafIT.java +++ b/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/KarafIT.java @@ -19,7 +19,6 @@ import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied; import static org.apache.http.HttpStatus.SC_CREATED; -import static org.apache.http.impl.client.HttpClientBuilder.create; import static org.fcrepo.camel.FcrepoHeaders.FCREPO_URI; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -41,12 +40,19 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + import javax.inject.Inject; import org.apache.camel.CamelContext; import org.apache.camel.component.mock.MockEndpoint; import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; @@ -78,6 +84,10 @@ public class KarafIT { private static Logger LOGGER = getLogger(KarafIT.class); + private final static String FEDORA_USERNAME = "fedoraAdmin"; + + private final static String FEDORA_PASSWORD = "fedoraAdmin"; + @Inject protected FeaturesService featuresService; @@ -98,6 +108,7 @@ public Option[] config() throws Exception { karafDistributionConfiguration() .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf") .versionAsInProject().type("zip")) + .karafVersion("4.0.6") .unpackDirectory(new File("target", "exam")) .useDeployFolder(false), logLevel(LogLevel.WARN), @@ -117,15 +128,13 @@ public Option[] config() throws Exception { CoreOptions.systemProperty("jms.port").value(jmsPort), CoreOptions.systemProperty("fcrepo.service.activemq.bundle").value(fcrepoServiceBundle), - editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.brokerUrl", - "tcp://localhost:" + jmsPort), editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg", "log4j.logger.org.apache.camel.impl.converter", "ERROR, stdout"), bundle(fcrepoServiceBundle).start(), streamBundle( TinyBundles.bundle().add("OSGI-INF/blueprint/blueprint-test.xml", - new File("src/test/resources/OSGI-INF/blueprint/blueprint-test.xml").toURL()) + new File("src/test/resources/OSGI-INF/blueprint/blueprint-test.xml").toURI().toURL()) .set(Constants.BUNDLE_SYMBOLICNAME, "org.fcrepo.camel.service.activemq.test") .set(Constants.BUNDLE_MANIFESTVERSION, "2") .set(Constants.DYNAMICIMPORT_PACKAGE, "*") @@ -136,7 +145,9 @@ public Option[] config() throws Exception { editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.connections", "1"), editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort), editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort), - editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort) + editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort), + editConfigurationFilePut("etc/org.fcrepo.camel.service.activemq.cfg", "jms.brokerUrl", + "tcp://localhost:" + jmsPort) }; } @@ -149,8 +160,8 @@ public void testInstallation() throws Exception { @Test public void testQueuingService() throws Exception { - final CloseableHttpClient client = create().build(); - final String baseUrl = "http://localhost:" + System.getProperty("fcrepo.port") + "/fcrepo/rest"; + final String webPort = System.getProperty("fcrepo.port"); + final String baseUrl = "http://localhost:" + webPort + "/fcrepo/rest"; final CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.name=FcrepoQueuingService)", 10000); @@ -162,19 +173,31 @@ public void testQueuingService() throws Exception { final String url1 = post(baseUrl); final String url2 = post(baseUrl); - resultEndpoint.expectedMessageCount(4); - resultEndpoint.expectedHeaderValuesReceivedInAnyOrder(FCREPO_URI, url1, url2, baseUrl, baseUrl); + final List expected = new ArrayList<>(); + expected.add(baseUrl); + expected.add(baseUrl); + expected.add(url1); + expected.add(url2); + expected.add(url1 + "/fcr:versions"); + expected.add(url2 + "/fcr:versions"); + + resultEndpoint.expectedHeaderValuesReceivedInAnyOrder(FCREPO_URI, expected); + resultEndpoint.await(500, TimeUnit.MILLISECONDS); + assertIsSatisfied(resultEndpoint); } private String post(final String url) { - final CloseableHttpClient httpclient = HttpClients.createDefault(); + final BasicCredentialsProvider provider = new BasicCredentialsProvider(); + provider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(FEDORA_USERNAME, FEDORA_PASSWORD)); + final CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(provider).build(); + try { final HttpPost httppost = new HttpPost(url); final HttpResponse response = httpclient.execute(httppost); assertEquals(SC_CREATED, response.getStatusLine().getStatusCode()); return EntityUtils.toString(response.getEntity(), "UTF-8"); - } catch (IOException ex) { + } catch (final IOException ex) { LOGGER.debug("Unable to extract HttpEntity response into an InputStream: ", ex); return ""; } @@ -190,9 +213,9 @@ private T getOsgiService(final Class type, final String filter, final lon throw new RuntimeException("Gave up waiting for service " + filter); } return type.cast(svc); - } catch (InvalidSyntaxException e) { + } catch (final InvalidSyntaxException e) { throw new IllegalArgumentException("Invalid filter", e); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { throw new RuntimeException(e); } } diff --git a/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/RouteIT.java b/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/RouteIT.java index 5f87fab1..883730cd 100644 --- a/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/RouteIT.java +++ b/fcrepo-service-activemq/src/test/java/org/fcrepo/camel/service/activemq/RouteIT.java @@ -17,13 +17,17 @@ */ package org.fcrepo.camel.service.activemq; +import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied; import static org.apache.http.HttpStatus.SC_CREATED; import static org.fcrepo.camel.FcrepoHeaders.FCREPO_URI; import static org.slf4j.LoggerFactory.getLogger; import java.io.IOException; +import java.util.ArrayList; import java.util.Dictionary; +import java.util.List; import java.util.Map; +import java.util.concurrent.TimeUnit; import org.apache.activemq.camel.component.ActiveMQComponent; import org.apache.camel.EndpointInject; @@ -31,7 +35,10 @@ import org.apache.camel.test.blueprint.CamelBlueprintTestSupport; import org.apache.camel.util.KeyValueHolder; import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; @@ -49,6 +56,9 @@ public class RouteIT extends CamelBlueprintTestSupport { private static final Logger LOGGER = getLogger(RouteIT.class); + private static String FEDORA_USERNAME = "fedoraAdmin"; + private static String FEDORA_PASSWORD = "fedoraAdmin"; + @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @@ -75,27 +85,41 @@ public boolean isUseRouteBuilder() { @Test public void testQueuingService() throws Exception { - resultEndpoint.reset(); - final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); + final String webPort = System.getProperty("fcrepo.dynamic.test.port", "8080"); final String baseUrl = "http://localhost:" + webPort + "/fcrepo/rest"; + + resultEndpoint.reset(); + final String url1 = post(baseUrl); final String url2 = post(baseUrl); - resultEndpoint.expectedMessageCount(4); - resultEndpoint.expectedHeaderValuesReceivedInAnyOrder(FCREPO_URI, url1, url2, baseUrl, baseUrl); + final List expectedIds = new ArrayList<>(); + expectedIds.add(baseUrl); + expectedIds.add(baseUrl); + expectedIds.add(url1); + expectedIds.add(url2); + expectedIds.add(url1 + "/fcr:versions"); + expectedIds.add(url2 + "/fcr:versions"); + + // expectedMessageCount is set to the number of elements passed to the below function, + // so we need to account for them all or the test stops and just checks the ones we have. + resultEndpoint.expectedHeaderValuesReceivedInAnyOrder(FCREPO_URI, expectedIds); + resultEndpoint.await(500, TimeUnit.MILLISECONDS); - assertMockEndpointsSatisfied(); + assertIsSatisfied(resultEndpoint); } private String post(final String url) { - final CloseableHttpClient httpclient = HttpClients.createDefault(); + final BasicCredentialsProvider provider = new BasicCredentialsProvider(); + provider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(FEDORA_USERNAME, FEDORA_PASSWORD)); + final CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(provider).build(); try { final HttpPost httppost = new HttpPost(url); final HttpResponse response = httpclient.execute(httppost); assertEquals(SC_CREATED, response.getStatusLine().getStatusCode()); return EntityUtils.toString(response.getEntity(), "UTF-8"); - } catch (IOException ex) { + } catch (final IOException ex) { LOGGER.debug("Unable to extract HttpEntity response into an InputStream: ", ex); return ""; } diff --git a/fcrepo-service-activemq/src/test/resources/jetty-test.xml b/fcrepo-service-activemq/src/test/resources/jetty-test.xml new file mode 100644 index 00000000..77396270 --- /dev/null +++ b/fcrepo-service-activemq/src/test/resources/jetty-test.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/fcrepo-service-activemq/src/test/resources/jetty-users.properties b/fcrepo-service-activemq/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/fcrepo-service-activemq/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin diff --git a/fcrepo-service-camel/pom.xml b/fcrepo-service-camel/pom.xml index 2199bc01..1cc7c332 100644 --- a/fcrepo-service-camel/pom.xml +++ b/fcrepo-service-camel/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-service-camel @@ -224,10 +224,6 @@ fcrepo.dynamic.reindexing.port ${fcrepo.dynamic.reindexing.port} - - fcrepo.dynamic.test.port - ${fcrepo.dynamic.test.port} - fcrepo.dynamic.jms.port ${fcrepo.dynamic.jms.port} @@ -255,13 +251,14 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - + ${project.build.directory}/fcrepo.war /fcrepo diff --git a/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/KarafIT.java b/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/KarafIT.java index a05b1ace..10b4cdff 100644 --- a/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/KarafIT.java +++ b/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/KarafIT.java @@ -19,7 +19,6 @@ import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied; import static org.apache.http.HttpStatus.SC_CREATED; -import static org.apache.http.impl.client.HttpClients.createDefault; import static org.fcrepo.camel.FcrepoHeaders.FCREPO_BASE_URL; import static org.fcrepo.camel.FcrepoHeaders.FCREPO_IDENTIFIER; import static org.fcrepo.camel.FcrepoHeaders.FCREPO_URI; @@ -50,8 +49,12 @@ import org.apache.camel.ProducerTemplate; import org.apache.camel.component.mock.MockEndpoint; import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; import org.apache.karaf.features.FeaturesService; import org.junit.Test; @@ -77,7 +80,14 @@ @ExamReactorStrategy(PerClass.class) public class KarafIT { - private final CloseableHttpClient httpclient = createDefault(); + private final static String FEDORA_USERNAME = "fedoraAdmin"; + + private final static String FEDORA_PASSWORD = "fedoraAdmin"; + + private final BasicCredentialsProvider provider = new BasicCredentialsProvider(); + + private final CloseableHttpClient httpclient; + private static Logger LOGGER = getLogger(KarafIT.class); @Inject @@ -86,6 +96,11 @@ public class KarafIT { @Inject protected BundleContext bundleContext; + public KarafIT() { + provider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(FEDORA_USERNAME, FEDORA_PASSWORD)); + httpclient = HttpClients.custom().setDefaultCredentialsProvider(provider).build(); + } + @Configuration public Option[] config() throws Exception { final ConfigurationManager cm = new ConfigurationManager(); @@ -119,6 +134,10 @@ public Option[] config() throws Exception { editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.baseUrl", "http://localhost:" + fcrepoPort + "/fcrepo/rest"), + editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.authUsername", + FEDORA_USERNAME), + editConfigurationFilePut("etc/org.fcrepo.camel.service.cfg", "fcrepo.authPassword", + FEDORA_PASSWORD), bundle(fcrepoServiceBundle).start(), @@ -168,7 +187,7 @@ private String post(final String url) { final HttpResponse response = httpclient.execute(httppost); assertEquals(SC_CREATED, response.getStatusLine().getStatusCode()); return EntityUtils.toString(response.getEntity(), "UTF-8"); - } catch (IOException ex) { + } catch (final IOException ex) { LOGGER.debug("Unable to extract HttpEntity response into an InputStream: ", ex); return ""; } @@ -184,9 +203,9 @@ private T getOsgiService(final Class type, final String filter, final lon throw new RuntimeException("Gave up waiting for service " + filter); } return type.cast(svc); - } catch (InvalidSyntaxException e) { + } catch (final InvalidSyntaxException e) { throw new IllegalArgumentException("Invalid filter", e); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { throw new RuntimeException(e); } } diff --git a/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/RouteIT.java b/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/RouteIT.java index 34fabed0..003092b5 100644 --- a/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/RouteIT.java +++ b/fcrepo-service-camel/src/test/java/org/fcrepo/camel/service/RouteIT.java @@ -34,7 +34,10 @@ import org.apache.camel.test.blueprint.CamelBlueprintTestSupport; import org.apache.camel.util.KeyValueHolder; import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; @@ -53,6 +56,9 @@ public class RouteIT extends CamelBlueprintTestSupport { private static final Logger LOGGER = getLogger(RouteIT.class); + private static String FEDORA_USERNAME = "fedoraAdmin"; + private static String FEDORA_PASSWORD = "fedoraAdmin"; + @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @@ -70,7 +76,8 @@ protected void addServicesOnStartup(final Map + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/fcrepo-service-camel/src/test/resources/jetty-users.properties b/fcrepo-service-camel/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/fcrepo-service-camel/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin diff --git a/fcrepo-service-ldcache-file/pom.xml b/fcrepo-service-ldcache-file/pom.xml index 82f6a352..618dcdc6 100644 --- a/fcrepo-service-ldcache-file/pom.xml +++ b/fcrepo-service-ldcache-file/pom.xml @@ -6,7 +6,7 @@ fcrepo-camel-toolbox org.fcrepo.camel - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT fcrepo-service-ldcache-file diff --git a/pom.xml b/pom.xml index 7ec73c57..30f87c6b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,13 +6,13 @@ org.fcrepo fcrepo-parent - 4.6.0 + 5.0.1 org.fcrepo.camel fcrepo-camel-toolbox pom - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT Fedora4 Camel Workflows A collection of camel-based event-driven workflows @@ -44,9 +44,9 @@ 3.3.0 1.7.20 4.2.5.RELEASE - 4.7.0 - 0.2.1 - 4.5.0 + 5.0.2 + 0.4.0 + 5.0.0-SNAPSHOT 4.4.1 1.7.0 @@ -55,7 +55,7 @@ 1.1.3 2.3.16 1.3 - 4.3.6 + 4.5.5 4.4.6 2.3.0 2.4.1 @@ -64,10 +64,13 @@ 4.8.0 4.10.2 2.11.0 + + 2.18.1 * - 9.2.6.v20141205 + 9.3.25.v20180904 + ${project.build.directory}/test-classes/jetty-users.properties 1.2.4 @@ -444,6 +447,13 @@ install + + + true + src/test/resources + + + diff --git a/toolbox-features/pom.xml b/toolbox-features/pom.xml index 528b174e..3c08554e 100644 --- a/toolbox-features/pom.xml +++ b/toolbox-features/pom.xml @@ -6,7 +6,7 @@ org.fcrepo.camel fcrepo-camel-toolbox - 4.8.1-SNAPSHOT + 5.0.0-SNAPSHOT toolbox-features @@ -329,10 +329,6 @@ fcrepo.dynamic.stomp.port ${fcrepo.dynamic.stomp.port} - - fcrepo.dynamic.test.port - ${fcrepo.dynamic.test.port} - fcrepo.modeshape.configuration classpath:/config/file-simple/repository.json @@ -352,13 +348,14 @@ start + ${project.build.directory}/test-classes/jetty-test.xml ${fcrepo.dynamic.test.port} 0 true - + ${project.build.directory}/fcrepo.war /fcrepo diff --git a/toolbox-features/src/test/resources/jetty-test.xml b/toolbox-features/src/test/resources/jetty-test.xml new file mode 100644 index 00000000..77396270 --- /dev/null +++ b/toolbox-features/src/test/resources/jetty-test.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fcrepo + + + + + + + + + + + + 60000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/toolbox-features/src/test/resources/jetty-users.properties b/toolbox-features/src/test/resources/jetty-users.properties new file mode 100644 index 00000000..d582f457 --- /dev/null +++ b/toolbox-features/src/test/resources/jetty-users.properties @@ -0,0 +1,3 @@ +testuser: testpass,fedoraUser +testuser2: testpass,fedoraUser +fedoraAdmin: fedoraAdmin,fedoraAdmin From cfa295d98db9e8ee82aa36819866e143a16f1838 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Thu, 14 Mar 2019 13:15:34 -0500 Subject: [PATCH 2/3] Bump camel to 2.20.0 --- .../triplestore/TriplestoreRouter.java | 1 + .../camel/indexing/triplestore/RouteTest.java | 22 ++++++++++++++----- .../fcrepo/camel/ldpath/FedoraProvider.java | 6 ++--- .../BinaryDisabledRouteTest.java | 21 +++++++++++++----- .../serialization/BinaryEnabledRouteTest.java | 3 ++- pom.xml | 4 ++-- 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/fcrepo-indexing-triplestore/src/main/java/org/fcrepo/camel/indexing/triplestore/TriplestoreRouter.java b/fcrepo-indexing-triplestore/src/main/java/org/fcrepo/camel/indexing/triplestore/TriplestoreRouter.java index 1b064b8a..a891c529 100644 --- a/fcrepo-indexing-triplestore/src/main/java/org/fcrepo/camel/indexing/triplestore/TriplestoreRouter.java +++ b/fcrepo-indexing-triplestore/src/main/java/org/fcrepo/camel/indexing/triplestore/TriplestoreRouter.java @@ -51,6 +51,7 @@ public class TriplestoreRouter extends RouteBuilder { /** * Configure the message route workflow. */ + @Override public void configure() throws Exception { final Namespaces ns = new Namespaces("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); diff --git a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java index 839a75c1..9323b974 100644 --- a/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java +++ b/fcrepo-indexing-triplestore/src/test/java/org/fcrepo/camel/indexing/triplestore/RouteTest.java @@ -102,7 +102,8 @@ public void testEventTypeRouter() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("direct:index.triplestore"); + mockEndpointsAndSkip("direct:delete.triplestore"); } }); context.start(); @@ -123,7 +124,10 @@ public void testAuditFilter() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("http:*"); + mockEndpointsAndSkip("direct:delete.triplestore"); + mockEndpointsAndSkip("direct:index.triplestore"); } }); context.start(); @@ -146,7 +150,10 @@ public void testAuditFilterExactMatch() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("http:*"); + mockEndpointsAndSkip("direct:delete.triplestore"); + mockEndpointsAndSkip("direct:index.triplestore"); } }); context.start(); @@ -169,7 +176,10 @@ public void testAuditFilterNearMatch() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("http:*"); + mockEndpointsAndSkip("direct:delete.triplestore"); + mockEndpointsAndSkip("direct:index.triplestore"); } }); context.start(); @@ -192,7 +202,9 @@ public void testAuditFilterNearMatchIndexable() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("direct:delete.triplestore"); + mockEndpointsAndSkip("direct:update.triplestore"); } }); context.start(); diff --git a/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/FedoraProvider.java b/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/FedoraProvider.java index af562133..43594059 100644 --- a/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/FedoraProvider.java +++ b/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/FedoraProvider.java @@ -49,7 +49,7 @@ public class FedoraProvider extends LinkedDataProvider { public static final String PROVIDER_NAME = "Fedora"; - private HttpClient httpClient; + private final HttpClient httpClient; private final String NON_RDF_SOURCE_URI = "http://www.w3.org/ns/ldp#NonRDFSource"; @@ -83,7 +83,7 @@ public List buildRequestUrl(final String resourceUri, final Endpoint end if ( nonRdfSourceDescUri.isPresent() ) { return Collections.singletonList(nonRdfSourceDescUri.get()); } - } catch (IOException ex) { + } catch (final IOException ex) { throw new UncheckedIOException(ex); } return Collections.singletonList(resourceUri); @@ -98,7 +98,7 @@ private Optional getNonRDFSourceDescribedByUri(final String resourceUri) if ( links != null ) { String descriptionUri = null; boolean isNonRDFSource = false; - for ( Header h : links ) { + for ( final Header h : links ) { final FcrepoLink link = new FcrepoLink(h.getValue()); if ( link.getRel().equals("describedby") ) { descriptionUri = link.getUri().toString(); diff --git a/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryDisabledRouteTest.java b/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryDisabledRouteTest.java index 1aa676f0..cb1c4a16 100644 --- a/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryDisabledRouteTest.java +++ b/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryDisabledRouteTest.java @@ -40,7 +40,10 @@ public void testMetatdataSerialization() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("direct:metadata"); + mockEndpointsAndSkip("direct:binary"); + mockEndpointsAndSkip("direct:delete"); + mockEndpointsAndSkip("fcrepo:*"); } }); context.start(); @@ -61,7 +64,10 @@ public void testMetadataSerializationRemoveNode() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("direct:metadata"); + mockEndpointsAndSkip("direct:binary"); + mockEndpointsAndSkip("direct:delete"); + mockEndpointsAndSkip("fcrepo:*"); } }); context.start(); @@ -81,7 +87,10 @@ public void testMetadataReSerialization() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("direct:metadata"); + mockEndpointsAndSkip("direct:binary"); + mockEndpointsAndSkip("direct:delete"); + mockEndpointsAndSkip("fcrepo:*"); } }); context.start(); @@ -101,7 +110,8 @@ public void testMetadataUpdaterIndexable() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("file:*"); weaveAddLast().to("mock:result"); } }); @@ -122,7 +132,8 @@ public void testMetadataUpdaterBinary() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("file:*"); } }); context.start(); diff --git a/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryEnabledRouteTest.java b/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryEnabledRouteTest.java index 2e1ac72e..49dffd5e 100644 --- a/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryEnabledRouteTest.java +++ b/fcrepo-serialization/src/test/java/org/fcrepo/camel/serialization/BinaryEnabledRouteTest.java @@ -58,7 +58,8 @@ public void testMetadataUpdaterBinary() throws Exception { @Override public void configure() throws Exception { replaceFromWith("direct:start"); - mockEndpointsAndSkip("*"); + mockEndpointsAndSkip("fcrepo:*"); + mockEndpointsAndSkip("file:*"); } }); context.start(); diff --git a/pom.xml b/pom.xml index 30f87c6b..bc4b9f7a 100644 --- a/pom.xml +++ b/pom.xml @@ -32,11 +32,11 @@ [5.14,6) - [2.18,3) + [2.20,3) 5.14.1 - 2.18.0 + 2.20.0 3.4 2.7.3 3.1.1 From 8114d9bb9252b4c6eaec056d31a384127a0d49ed Mon Sep 17 00:00:00 2001 From: dbernstein Date: Thu, 14 Mar 2019 15:23:38 -0700 Subject: [PATCH 3/3] Suppress warning messages in the maven output in order to prevent the log from growing too long for travis (due to shiro bug that produces unnecessary WARNING messages). --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fedaa9a9..eadb3c7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ script: - sudo service resolvconf stop - sudo service sshguard stop - sudo service ssh stop - - mvn install -B -V + - mvn install -B -V -q notifications: irc: "irc.freenode.org#fcrepo"