[MGNLREST-323] Provide a standard ImportEndpoint for bootstrapping content Created: 09/Aug/21 Updated: 03/Jan/22 Resolved: 10/Nov/21 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | services |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.10, 3.0.0 |
| Type: | New Feature | Priority: | Neutral |
| Reporter: | Mikaël Geljić | Assignee: | Mikaël Geljić |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | testing | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Patch included: |
Yes
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Epic Link: | SaaS ITs | ||||||||||||||||||||||||
| Sprint: | Cloud Service 16, Cloud Service 17, SaaS 18, SaaS 19, SaaS 21 | ||||||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||||||
| Description |
|
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 flowA dedicated ImportEndpoint at /.rest/import/v1, accepting multipart/form-data— suitable for uploading files as attachments (parts)—and a target path query-parameter.
The endpoint is expected to answer with No Content (204) if successful. Current flow this replacesThe 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. |