Skip to content

integration: Adds support for external source providers - #510

Open
claudiubelu wants to merge 3 commits into
cloudbase:masterfrom
claudiubelu:integration-external-source-provider
Open

integration: Adds support for external source providers#510
claudiubelu wants to merge 3 commits into
cloudbase:masterfrom
claudiubelu:integration-external-source-provider

Conversation

@claudiubelu

Copy link
Copy Markdown
Member

Adds BaseTestExportProvider class, meant to be implemented by export providers to be used for testing. Similar to BaseTestImportProvider, it has initialize and teardown, meant to record initial resources and flag leaked resources when tests finish.

Moves the src loop device creation logic into the source provider, served by calling get_test_instance.

TestExportProvider will now report leaked "coriolis-replicator-*" containers on test teardown.

Updates the harness to read and handle a "source" provider in providers.yaml, falling back to the existing test export provider
(similar to how the "destination" provider is being handled).

Moves provider prerequisites check to the harness.

Skips tests dependent on the test export provider.

tox.ini now accepts CORIOLIS_SOURCE_PROVIDER_PACKAGE and CORIOLIS_DESTINATION_PROVIDER_PACKAGE
dependencies for integration tests, instead of CORIOLIS_PROVIDER_PACKAGE. It will install them, as they are required to run the integration tests.

Updates README.md and providers.yaml.sample with details about the source provider.

coriolis-replicator refuses loop devices as exportable block devices by
default. The integration tests' fake source / destination providers used
scsi_debug to work around that. scsi_debug backs every host added under a
given module load with the same dev_size_mb, so tests needing bigger devices
(OS morphing, LUKS) had to unload / reload the kernel module around them.
This essentially means that the tests have to run sequentially on the
same host.

Loop devices are backed by an individually-sized sparse file per device,
so this constraint goes away. The test export provider now starts the replicator
with -allow-loop-devices=true.

The test suite has been updated to use loop devices instead of
scsi_debug devices.

Updated the vendored replicator binary, which now accepts the
-allow-loop-devices flag.
Adds BaseTestExportProvider class, meant to be implemented by export
providers to be used for testing. Similar to BaseTestImportProvider,
it has initialize and teardown, meant to record initial resources and
flag leaked resources when tests finish.

Moves the src loop device creation logic into the source provider,
served by calling get_test_instance.

TestExportProvider will now report leaked "coriolis-replicator-*"
containers on test teardown.
Updates the harness to read and handle a "source" provider in
providers.yaml, falling back to the existing test export provider
(similar to how the "destination" provider is being handled).

Moves provider prerequisites check to the harness.

Skips tests dependent on the test export provider.

tox.ini now accepts CORIOLIS_SOURCE_PROVIDER_PACKAGE and CORIOLIS_DESTINATION_PROVIDER_PACKAGE
dependencies for integration tests, instead of CORIOLIS_PROVIDER_PACKAGE.
It will install them, as they are required to run the integration tests.

Updates README.md and providers.yaml.sample with details about the
source provider.
@claudiubelu
claudiubelu force-pushed the integration-external-source-provider branch from af97706 to 859920c Compare August 27, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant