As of M6.2.11, bootstrapping test fixtures (and light-module fixtures) for integration-tests goes through the testcommands endpoint.
This forces us to build separate runtime images of the product in order to use the test-framework and these facilities. Instead, we're looking towards running tests on vanilla product images. Therefore we aim to support bootstrapping content via REST, in the product itself.
Proposed flow
A dedicated ImportEndpoint at /.rest/import/v1, accepting multipart/form-data— suitable for uploading files as attachments (parts)—and a target path query-parameter.
Target workspace is conventionally inferred from the uploaded bootstrap-file name, e.g. contacts.some-folder.mmonroe.xml.
- The invoked command is still the standard JcrImportCommand (src); it accepts a "stream" parameter.
- MgnlCommand#execute takes care of overlaying command parameters onto the command itself via BeanUtils, hence setting the "stream" param here.
The endpoint is expected to answer with No Content (204) if successful.
Current flow this replaces
The testcommands endpoint is a forked implementation of the standard rest-services CommandEndpoint.
Bootstrap files (actual test files) are base64 encoded by the test-framework. Then the test CommandEndpoint parses query parameters, searches for one named "input", decodes it back as a plain String, and pushes the base64-decoded result as a "stream" entry into the command parameter map.
- is cloned by
-
MGNLREST-335 Provide ITs or tests for the ImportEndpoint
- Closed
- relates to
-
MGNLTEST-166 Fixtures should not use testcommands endpoint
- Closed
-
MGNLTEST-163 Make configurable list of test instances
- Closed
- mentioned in
-
Page Loading...