<!--
Import a record with a client-provided CSID.
- Then also insert the value of that CSID into a field via the ${docID} variable.
+ Then also exercise the Imports services's variable expansion:
+ * Insert the value of that CSID into a field via expansion
+ of the ${docID} variable.
+ * Verify that variable has been expanded in the imported record.
+ * Verify that a server-side variable has also been expanded in the
+ wrapper template for imported records; specifically, that an
+ expected value is is present in the collectionspace_core part.
(See "Variables supported in expansion of request" in
http://wiki.collectionspace.org/display/collectionspace/Imports+Service+Home)
-->
- <test ID="importObjectExitWithDocID">
+ <test ID="importObjectExitWithVarExpansion">
<expectedCodes>200</expectedCodes>
<method>POST</method>
<uri>/cspace-services/imports</uri>
- <filename>imports/import-objectexit-docid.xml</filename>
+ <filename>imports/import-objectexit-varexpansion.xml</filename>
<vars>
<var ID="recordCSID">920c578f-e5d6-45da-adab-6f26f6a491ff</var>
</vars>
<filename>imports/res/import-objectexit.res.xml</filename>
</response>
</test>
- <test ID="verifyObjectExitWithDocID">
+ <test ID="verifyObjectExitWithVarExpansion">
<expectedCodes>200</expectedCodes>
<method>GET</method>
- <uri>/cspace-services/objectexit/${importObjectExitWithDocID.recordCSID}</uri>
+ <uri>/cspace-services/objectexit/${importObjectExitWithVarExpansion.recordCSID}</uri>
<response>
<expected level="ADDOK" />
- <filename>imports/res/import-objectexit-docID.res.xml</filename>
+ <filename>imports/res/import-objectexit-varexpansion.res.xml</filename>
<label>objectexit_common</label>
</response>
</test>
- <test ID="deleteObjectExitWithDocID">
+ <test ID="deleteObjectExitWithVarExpansion">
<expectedCodes>200</expectedCodes>
<method>DELETE</method>
- <uri>/cspace-services/objectexit/${importObjectExitWithDocID.recordCSID}</uri>
+ <uri>/cspace-services/objectexit/${importObjectExitWithVarExpansion.recordCSID}</uri>
</test>
<!--
-->
<testGroup ID="importsTemporaryTestGroup" autoDeletePOSTS="false">
+ <!-- Add new or changed tests here -->
+
+ </testGroup>
+
+
+ <!--
+ Test group holding notes and markup fragments for possible future
+ standard tests of the Imports service.
+ -->
+ <testGroup ID="importsTestNotesGroup" autoDeletePOSTS="false">
+
<!-- The following tests are not currently working, and thus are commented out. -->
<!--
Import a single ObjectExit record, at least one of whose fields
</test>
-->
- <!-- FIXME: Add forms-based import test -->
+ <!-- FIXME: Add a test of the forms-based import pathway. -->
+ <!-- This may require support for the requisite MIME type in XmlReplay -->
<!--
<test ID="import-post-form">
<expectedCodes>200</expectedCodes>
</test>
-->
- <!-- FIXME: Add tests with invalid payloads, via each imports path -->
-
- <!-- Add new or changed tests here -->
+ <!-- FIXME: Add import of records with schema expansion part(s). -->
+ <!-- FIXME: Add tests with invalid payloads, via each imports path, -->
+ <!-- and verify failure results. -->
+
</testGroup>
</xmlReplay>
<?xml version="1.0" encoding="UTF-8"?>
<document name="objectexit">
<ns2:objectexit_common xmlns:ns2="http://collectionspace.org/services/objectexit" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <exitNote>The value of a 'docID' variable in the original import document should be inserted here: ${importObjectExitWithDocID.recordCSID}</exitNote>
+ <exitNote>The value of a 'docID' variable in the original import document should be inserted here: ${importObjectExitWithVarExpansion.recordCSID}</exitNote>
<exitNumber>OE-IMPORT-TEST-1999.8</exitNumber>
</ns2:objectexit_common>
+ <ns2:collectionspace_core xmlns:ns2="http://collectionspace.org/collectionspace_core/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <!-- Note: This test may fail if the identifier for the core tenant changes. -->
+ <tenantId>1</tenantId>
+ </ns2:collectionspace_core>
</document>