integration: Adds OS morphing deployment integration test#430
Conversation
9cd5701 to
959b670
Compare
| ) | ||
|
|
||
| # (re)init the scsi_debug module. | ||
| test_utils.destroy_scsi_debug() |
There was a problem hiding this comment.
Are we planning to switch to loopback devices btw? I think we'll need to in order to parallelize the tests.
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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 :).
There was a problem hiding this comment.
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.
959b670 to
9307c3f
Compare
Replace the stub
deploy_os_morphing_resources/delete_os_morphing_resourceswith a real implementation that starts a container withopenssh-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.