microcks / microcks-testcontainers-java

Java lib for Testcontainers that enables embedding Microcks into your JUnit tests with lightweight, throwaway instance thanks to containers.
https://microcks.io
Apache License 2.0
19 stars 4 forks source link

Allow importing local repository snapshots #47

Closed lbroudoux closed 5 months ago

lbroudoux commented 5 months ago

Reason/Context

As Microcks allows import of standard artifacts, it also allow loading repository snapshots as described in the documentation here: https://microcks.io/documentation/administrating/snapshots/

Snapshots are lightweight structures that can be used to:

Description

We want a new withSnapshots(String... snapshotPath) method that allows specifying snapshots to load at container startup.

We also want a specific importSnapshot(File snapshotFile) generic method that can be used after container startup.

Beware that due to their nature, snapshots should loaded first before loading any other artifacts at startup. Artifacts may then override existing parts of services loaded from snapshots. If explicitly imported after the startup, a snapshot may then delete customization done by artifacts.

Implementation ideas

No response

lbroudoux commented 5 months ago

It must also provide a fallback method like in #45