Skip to content

integration: Adds OS morphing deployment integration test#430

Merged
Dany9966 merged 2 commits into
cloudbase:masterfrom
claudiubelu:os-morphing-tests
May 15, 2026
Merged

integration: Adds OS morphing deployment integration test#430
Dany9966 merged 2 commits into
cloudbase:masterfrom
claudiubelu:os-morphing-tests

Conversation

@claudiubelu
Copy link
Copy Markdown
Member

Replace the stub deploy_os_morphing_resources / delete_os_morphing_resources with a real implementation that starts a container with openssh-server, injects the test public key via bind mount, and returns SSH connection info for the OS morphing pipeline.

Adds OS morphing test, in which we prepare a source disk with an Ubuntu filesystem, based on the Ubuntu container image. The test expects that a package (jq) will be present after the OS morphing process.

Copy link
Copy Markdown
Member

@petrutlucian94 petrutlucian94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

Comment thread coriolis/tests/integration/deployments/test_osmorphing.py Outdated
)

# (re)init the scsi_debug module.
test_utils.destroy_scsi_debug()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning to switch to loopback devices btw? I think we'll need to in order to parallelize the tests.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid we'll be using those for now. loopback devices are fine on the importer (coriolis-writer doesn't care what type of device it writes to), but on the exporter, coriolis-replicator ignores loopback devices.

test_utils.make_os_device(self._src_device, "ubuntu:24.04")

def test_deployment_with_os_morphing(self):
self.assertFalse(
Copy link
Copy Markdown
Member

@petrutlucian94 petrutlucian94 May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a bit brittle. So if jq ever gets included in the Ubuntu image, this test will start to fail.

On the other hand, we can keep it for the sake of simplicity. We'll use a different package if that happens :).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. In this example, we're basically using a container image, which is supposed to be a minimal base image to be further used for for other purposes; it shouldn't have a situational package as jq.

I've added this assertion as a sanity check, so we don't have a potentially false positive test (expect package to be installed by OS morphing, but it already existed anyways).

I'd keep jq for now, as it's very small. We can change it if needed later.

Replace the stub `deploy_os_morphing_resources` / `delete_os_morphing_resources`
with a real implementation that starts a container with openssh-server,
injects the test public key via bind mount, and returns SSH connection info
for the OS morphing pipeline.

Adds OS morphing test, in which we prepare a source disk with an Ubuntu filesystem,
based on the Ubuntu container image. The test expects that a package (jq) will
be present after the OS morphing process.
@Dany9966 Dany9966 merged commit a766c33 into cloudbase:master May 15, 2026
5 checks passed
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.

3 participants