Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use the rest.xml from webapp; add an optional modules spring config.
  • Loading branch information
cbeer committed Jun 11, 2013
1 parent 4391872 commit 40d9405
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 66 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/config/repository.json
Expand Up @@ -34,7 +34,7 @@
},
"storage" : {
"cacheName" : "FedoraRepository",
"cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:config/infinispan_configuration.xml}",
"cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:config/infinispan/basic/configuration.xml}",
"binaryStorage" : {
"type" : "composite",
"namedStores" : {
Expand Down
17 changes: 17 additions & 0 deletions src/main/resources/spring/optional_modules.xml
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<!-- Context that houses JAX-RS Resources that compose the API
as well as som utility gear. -->

<context:annotation-config/>

<context:component-scan
base-package="org.fcrepo.syndication, org.fcrepo.webhooks"/>

</beans>
41 changes: 0 additions & 41 deletions src/main/resources/spring/rest.xml

This file was deleted.

10 changes: 10 additions & 0 deletions src/test/java/org/fcrepo/integration/KitchenSinkIT.java
Expand Up @@ -62,6 +62,16 @@ public void doASanityCheck() throws IOException {
"rest/")));
}

@Test
public void doAnRssSanityCheck() throws IOException {
assertEquals(200, getStatus(new HttpGet(serverAddress + "rest/fcr:rss")));
}

@Test
public void doWebhooksSanityCheck() throws IOException {
assertEquals(200, getStatus(new HttpGet(serverAddress + "rest/fcr:webhooks")));
}

protected int getStatus(final HttpUriRequest method)
throws ClientProtocolException, IOException {
logger.debug("Executing: " + method.getMethod() + " to " +
Expand Down
24 changes: 0 additions & 24 deletions src/test/resources/spring-test/rest.xml

This file was deleted.

0 comments on commit 40d9405

Please sign in to comment.