You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Test Environment

HOST=localhost
PORT=8686
CONTEXT=f4
  1. Start Fedora 4.7.1-RC-2 one-click at port=8686 and context=f4

    java -Dfcrepo.dynamic.jms.port=61717 -Dfcrepo.dynamic.stomp.port=61713 -jar fcrepo-webapp/target/fcrepo-webapp-4.7.1-SNAPSHOT-jetty-console.jar --port 8686 --headless --contextPath /f4
  2. Start Fedora 4.7.1-RC-2 one-click at port=8080 and context=fcrepo

    java -jar fcrepo-webapp/target/fcrepo-webapp-4.7.1-SNAPSHOT-jetty-console.jar --port 8080 --headless --contextPath /fcrepo
  3. Load resources per ingest.sh
  4. Download 0.1.0 import/export jar

Test 0 - Export/Import excluding binaries

  1. Export from /f4 without binaries

    java -jar ./bin/fcrepo-import-export-0.1.0.jar -a -d data -m export -r http://localhost:8686/f4/rest/
    1. (tick) Audit log looks correct
    2. (tick) Correct resources were exported to data-dir
  2. Import to /fcrepo

    java -jar ./bin/fcrepo-import-export-0.1.0.jar -a -d data -m import -s http://localhost:8686/f4/rest/ -r http://localhost:8080/fcrepo/rest/
    1. Output:

      $ INFO 10:11:50.360 (Importer) Running importer...
    2. (warning) No resources loaded into /fcrepo
    3. (warning) Looking for user notes on how to configure logging... none found
  3. Import to /fcrepo with logging

    java -Dfcrepo.log.importexport=TRACE -jar ./bin/fcrepo-import-export-0.1.0.jar -a -d data -m import -s http://localhost:8686/f4/rest/ -r http://localhost:8080/fcrepo/rest/

     

    1. Output:

      $ DEBUG 10:14:46.806 (Importer) No container exists in the metadata directory data/fcrepo/rest.ttl for the requested resource http://localhost:8080/fcrepo/rest, importing all contained resources instead.
    2. (warning) Question, is it possible to export from :8686/f4 to :8080/fcrepo ?
      1. Resolution: Moved dir data/f4 to data/fcrepo, re-ran:

        java -Dfcrepo.log.importexport=TRACE -jar ./bin/fcrepo-import-export-0.1.0.jar -a -d data -m import -s http://localhost:8686/f4/rest/ -r http://localhost:8080/fcrepo/rest/
      2. (warning) Audit log indicates collections were imported, but received 400 on books
      3. (warning) Only book placeholder resources exist

Test 1 Conclusions

  1. (error) Round-tripping from one context to another not fully supported
  2. (error) Re-importing resources with inter-relationships not supported

=================================test1
h1. Export/Import with binaries
# Export from /f4 with binaries
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m export -r http://localhost:8686/f4/rest/

** Audit log looks correct
** Correct resources were exported to data-dir, including internal and external binaries

# Import to /fcrepo
> Moved dir data/f4 to data/fcrepo, ran:
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m import -s http://localhost:8686/f4/rest/ -r http://localhost:8080/fcrepo/rest/

** Audit log looks correct
** Visual comparison of HTML view of repositories looks correct
*** Note: namespaces must be defined in an external CND

** Conclusion1: Round-tripping with binaries works as expected, noting that the data-dir must be renamed if importing to a different context

=================================test2
h1. Export/Import single resource
# Export from /f4 - single resource
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m export -r http://localhost:8686/f4/rest/collection0

** Audit log looks correct
** Correct resource was exported to data-dir

# Import to /fcrepo
> Moved dir data/f4 to data/fcrepo, ran:
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m import -s http://localhost:8686/f4/rest/collection0 -r http://localhost:8080/fcrepo/rest/collection0

** Audit log has confusing output:
> 2017-01-08 10:59:39,544 import /home/awoods/Documents/work/fedora/notes/tasks/fedora/2017/import-export-testing/data/fcrepo/rest/collection0.ttl to http://localhost:8080/fcrepo/rest/collection0/../collection0
*** Note: /rest/collection0/../collection0

** Relationships point to resources with their original (/f4) URIs

** Conclusion1: Audit logging is correct but needs polish
** Conclusion2: Relationships to non-imported resources are not supported

=================================test3
h1. Export/Import single resource - with user-provided membership relationship, with internal binaries
# Export from /f4 - single resource
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -p http://pcdm.org/models#hasMember -d data -m export -r http://localhost:8686/f4/rest/collection0

** Audit log looks correct
** Correct resources were exported to data-dir, including internal binaries

# Import to /fcrepo
> Moved dir data/f4 to data/fcrepo, ran:
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m import -s http://localhost:8686/f4/rest/collection0 -r http://localhost:8080/fcrepo/rest/collection0

** Only targeted resource was imported

# Import to /fcrepo, indicating membership predicate
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -p http://pcdm.org/models#hasMember -d data -m import -s http://localhost:8686/f4/rest/collection0 -r http://localhost:8080/fcrepo/rest/collection0

** Only targeted resource was imported

# Import to /fcrepo, not specifying resource
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m import -s http://localhost:8686/f4/rest/ -r http://localhost:8080/fcrepo/rest/

** Audit log looks correct
** Correct resources were imported from data-dir, including internal binaries, relationships correct - pointing to internal resources

** Conclusion1: User-provided membership produces expected export
** Conclusion2: Re-imports must either be for a single resource or for the full repository... not clear how to re-import a tree of resources based on user-provided membership predicates

=================================test4
h1. Export/Import single resource - with user-provided membership relationship, with external binaries
# Export from /f4 - single resource
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -p http://pcdm.org/models#hasMember -d data -m export -r http://localhost:8686/f4/rest/collection1

** Audit log looks correct
** Correct resources were exported to data-dir, including external binaries

# Import to /fcrepo, not specifying resource
java -jar ./bin/fcrepo-import-export-0.1.0.jar -b -a -d data -m import -s http://localhost:8686/f4/rest/ -r http://localhost:8080/fcrepo/rest/

** Audit log looks correct
** Correct resources were imported from data-dir, including external binaries, relationships correct - pointing to internal resources

  • No labels