mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
dockertest 0.4 (#406)
* Updates to modern dockertest * More updates to latest dockertest * Update Cargo.lock to dockertest with handle restored * clippy coordinator tests * clippy full-stack tests * Remove kayabaNerve branch for official repo's latest commit hash * Update serai-client, remove reliance on the existence of a handle fn * Don't use the hex encoding of unique_id in dockertests Gets our hostnames just below 64 bytes, resolving test failures on at least Debian-based systems. * Use Network::Isolated for all dockertest instances * Correct error from prior commit's edits
This commit is contained in:
@@ -17,7 +17,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
||||
rand_core = "0.6"
|
||||
hex = "0.4"
|
||||
|
||||
dockertest = "0.3"
|
||||
dockertest = "0.4"
|
||||
serai-docker-tests = { path = "../docker" }
|
||||
|
||||
tokio = { version = "1", features = ["time"] }
|
||||
|
||||
@@ -4,7 +4,7 @@ pub fn reproducibly_builds() {
|
||||
|
||||
use rand_core::{RngCore, OsRng};
|
||||
|
||||
use dockertest::{PullPolicy, Image, Composition, DockerTest};
|
||||
use dockertest::{PullPolicy, Image, TestBodySpecification, DockerTest};
|
||||
|
||||
const RUNS: usize = 3;
|
||||
const TIMEOUT: u16 = 180 * 60; // 3 hours
|
||||
@@ -16,14 +16,14 @@ pub fn reproducibly_builds() {
|
||||
OsRng.fill_bytes(id);
|
||||
}
|
||||
|
||||
let mut test = DockerTest::new();
|
||||
let mut test = DockerTest::new().with_network(dockertest::Network::Isolated);
|
||||
for id in &ids {
|
||||
test.add_composition(
|
||||
Composition::with_image(
|
||||
test.provide_container(
|
||||
TestBodySpecification::with_image(
|
||||
Image::with_repository("serai-dev-runtime").pull_policy(PullPolicy::Never),
|
||||
)
|
||||
.with_container_name(format!("runtime-build-{}", hex::encode(id)))
|
||||
.with_cmd(vec![
|
||||
.set_handle(format!("runtime-build-{}", hex::encode(id)))
|
||||
.replace_cmd(vec![
|
||||
"sh".to_string(),
|
||||
"-c".to_string(),
|
||||
// Sleep for a minute after building to prevent the container from closing before we
|
||||
|
||||
Reference in New Issue
Block a user