summaryrefslogtreecommitdiff
path: root/webhook/src/handler/tests/handler_integration.rs
diff options
context:
space:
mode:
authorMatthieu <matthieu@developershouse.xyz>2021-10-13 14:49:39 +0400
committerMatthieu <matthieu@developershouse.xyz>2021-10-13 14:49:39 +0400
commit2d3962fb97ee4c8a5d09d2a2074b295d1ad9f0e5 (patch)
tree4082b68f8ec51e8b5ec7844dd77c5d44a38aa727 /webhook/src/handler/tests/handler_integration.rs
parent3c4c4a6cd058f640e99b956808d92d0fe0585375 (diff)
fix images for arm and windows
Diffstat (limited to 'webhook/src/handler/tests/handler_integration.rs')
-rw-r--r--webhook/src/handler/tests/handler_integration.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/webhook/src/handler/tests/handler_integration.rs b/webhook/src/handler/tests/handler_integration.rs
index 6aee0bd..a2ec403 100644
--- a/webhook/src/handler/tests/handler_integration.rs
+++ b/webhook/src/handler/tests/handler_integration.rs
@@ -15,12 +15,27 @@ use hyper::{Body, Method, Request};
use lazy_static::{__Deref, lazy_static};
use serde_json::json;
+#[cfg(all(unix, target_arch = "x86_64"))]
+const fn nats_image<'a>() -> &'a str {
+ return "amd64/nats";
+}
+
+#[cfg(all(unix, target_arch = "aarch64"))]
+const fn nats_image<'a>() -> &'a str {
+ return "arm64v8/nats";
+}
+
+#[cfg(all(target_arch = "x86_64", target_os = "windows"))]
+const fn nats_image<'a>() -> &'a str {
+ return "winamd64/nats";
+}
+
lazy_static! {
static ref DOCKER: Cli = Cli::default();
static ref NATS_CONTAINER: Container<'static, Cli, GenericImage> = {
test_init();
- let image: GenericImage = GenericImage::new("nats");
+ let image: GenericImage = GenericImage::new(nats_image());
let container = DOCKER.run(image);
container.start();
container.get_host_port(4222).unwrap();