Skip to content

Commit 7bee09c

Browse files
committed
refactor: replace wiremock with own test harness
Reasons: - there are too many layers of types that transfer/modify things - we gonna need a test harness that supports TLS/HTTPs - we need kinda precise control over which protocols are used to know what we're actually testing here - I wanna use something simple, i.e. not a full-blown "we launch a server in the background" magic thing like `httpmock`
1 parent 9f99e4f commit 7bee09c

6 files changed

Lines changed: 915 additions & 169 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ license = "MIT OR Apache-2.0"
1717

1818
[workspace.dependencies]
1919
arrow = { version = "57.1.0", default-features = false, features = ["ipc"] }
20+
bytes = "1.11.1"
2021
chrono = { version = "0.4.44", default-features = false }
2122
datafusion = { version = "52.0.0", default-features = false }
2223
datafusion-common = { version = "52.0.0", default-features = false }
@@ -36,6 +37,7 @@ gungraun = "0.18.1"
3637
http = { version = "1.4.0", default-features = false }
3738
http-body-util = "0.1.3"
3839
hyper = { version = "1.9", default-features = false }
40+
hyper-util = "0.1.20"
3941
insta = { version = "1.47.2", "default-features" = false }
4042
log = { version = "0.4.29", default-features = false }
4143
pyo3 = { version = "0.28.3", default-features = false, features = ["macros"] }

host/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@ wasmtime-wasi-http.workspace = true
3636
wasmtime-wasi-io.workspace = true
3737

3838
[dev-dependencies]
39+
bytes.workspace = true
3940
datafusion-udf-wasm-bundle = { workspace = true, features = [
4041
"evil",
4142
"example",
4243
"python"
4344
] }
4445
flate2.workspace = true
4546
gungraun.workspace = true
47+
http-body-util = { workspace = true, features = ["full"] }
48+
hyper-util = { workspace = true, features = ["server", "tokio"] }
4649
insta.workspace = true
4750
regex.workspace = true
4851
target-lexicon.workspace = true
4952
tokio = { workspace = true, features = ["fs", "macros"] }
50-
wiremock = "0.6.5"
5153

5254
[features]
5355
default = ["compiler"]

host/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@ pub use crate::component::CompilationFlags;
2121

2222
// unused-crate-dependencies false positives
2323
#[cfg(test)]
24+
use bytes as _;
25+
#[cfg(test)]
2426
use datafusion_udf_wasm_bundle as _;
2527
#[cfg(test)]
2628
use flate2 as _;
2729
#[cfg(test)]
2830
use gungraun as _;
2931
#[cfg(test)]
32+
use hyper_util as _;
33+
#[cfg(test)]
3034
use regex as _;
3135
#[cfg(test)]
3236
use target_lexicon as _;
33-
#[cfg(test)]
34-
use wiremock as _;
3537

3638
mod bindings;
3739
mod component;

0 commit comments

Comments
 (0)