Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removing IT from connector project (because REST API transaction cont…
…ext is required for the tests), and re-enabled the REST API federation write tests
  • Loading branch information
escowles committed Jul 9, 2014
1 parent 2de88d6 commit dd6050b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 22 deletions.
Expand Up @@ -108,6 +108,7 @@ public Document getDocumentById(final String id) {
}

final Document doc = super.getDocumentById(id);
if ( doc == null ) { return doc; }

final DocumentReader docReader = readDocument(doc);
final DocumentWriter docWriter = writeDocument(doc);
Expand Down
Expand Up @@ -15,14 +15,11 @@
*/
package org.fcrepo.integration.connector.file;

import org.fcrepo.kernel.FedoraObject;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.impl.rdf.impl.DefaultIdentifierTranslator;
import org.junit.Test;

import java.util.UUID;

import javax.jcr.PathNotFoundException;
import javax.jcr.Property;
import javax.jcr.RepositoryException;
Expand Down Expand Up @@ -125,17 +122,4 @@ public void testRemoveProperty() throws RepositoryException {

session.logout();
}

@Test
public void testCreateObject() throws RepositoryException {
final String id = UUID.randomUUID().toString();
Session session = repo.login();
objectService.createObject(session, "/" + federationName() + "/" + id);
session.save();
session.logout();

session = repo.login();
final FedoraObject obj = objectService.getObject(session, "/" + federationName() + "/" + id);
assertNotNull("Couldn't find object!", obj);
}
}
Expand Up @@ -103,7 +103,6 @@
import org.apache.http.impl.client.cache.CachingHttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.fcrepo.http.commons.domain.RDFMediaType;
import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
Expand Down Expand Up @@ -1419,9 +1418,7 @@ public String getMethod() {

/**
* I should be able to upload a file to a read/write federated filesystem.
* TODO: ignored until read-write filesystem support is reintroduced.
**/
@Ignore
@Test
public void testUploadToProjection() throws IOException {
// upload file to federated filesystem using rest api
Expand All @@ -1448,9 +1445,7 @@ public void testUploadToProjection() throws IOException {

/**
* I should be able to copy objects from the repository to a federated filesystem.
* TODO: ignored until read-write filesystem support is reintroduced.
**/
@Ignore
@Test
public void testCopyToProjection() throws IOException {
// create object in the repository
Expand Down
2 changes: 1 addition & 1 deletion fcrepo-http-api/src/test/resources/test_repository.json
Expand Up @@ -19,7 +19,7 @@
"fileSystem" : {
"classname" : "org.fcrepo.connector.file.FedoraFileSystemConnector",
"directoryPath" : "target/test-classes/test-objects",
"readonly" : true,
"readonly" : false,
"extraPropertiesStorage": "json",
"cacheTtlSeconds" : 5,
"projections" : [ "default:/files => /" ]
Expand Down

0 comments on commit dd6050b

Please sign in to comment.