Kurtosis allows you to write tests that simulate network partitions between different nodes of your network. To use this functionality:
IsPartitioningEnabled
flag to true
in your TestConfiguration
object that your test returnsrepartition
method on the NetworkContext
object to divide the network into multiple partitions, configuring the access between the partitions (blocked or not)This will set the desired network states between the various partitions, simulating a partitioned network. When adding services to the partitioned network, make sure to use NetworkContext.addServiceToPartition
rather than addService
, because the latter uses the default partition which will no longer exist after repartitioning.
External files can be mounted inside a Docker container running inside a Kurtosis test, so long as the files are packaged inside a GZ-compressed TAR file and hosted at a URL accessible by your CI. To use this functionality:
TestConfiguration
object, mapped to IDs that you’ll use to identify the artifactsContainerCreationConfig
inside your ContainerConfigFactory
, use the withFilesArtifacts
function of the builder to declare where to mount the files inside the artifacts