Skip to content

Commit 4899b83

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 1e6d240 commit 4899b83

5 files changed

Lines changed: 1022 additions & 169 deletions

File tree

Cargo.lock

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

host/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,21 @@ wasmtime-wasi-http.workspace = true
3232
wasmtime-wasi-io.workspace = true
3333

3434
[dev-dependencies]
35+
bytes = "1.11.1"
3536
datafusion-udf-wasm-bundle = { workspace = true, features = [
3637
"evil",
3738
"example",
3839
"python"
3940
] }
4041
flate2.workspace = true
4142
gungraun.workspace = true
43+
http-body-util = { version = "0.1.3", features = ["full"] }
44+
hyper-util = { version = "0.1.20", features = ["server", "tokio"] }
4245
insta.workspace = true
4346
regex.workspace = true
47+
reqwest = { version = "0.13.2", default-features = false }
4448
target-lexicon.workspace = true
4549
tokio = { workspace = true, features = ["fs", "macros"] }
46-
wiremock = "0.6.5"
4750

4851
[features]
4952
default = ["compiler"]

host/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,23 @@ 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 http_body_util as _;
33+
#[cfg(test)]
34+
use hyper_util as _;
35+
#[cfg(test)]
3036
use regex as _;
3137
#[cfg(test)]
32-
use target_lexicon as _;
38+
use reqwest as _;
3339
#[cfg(test)]
34-
use wiremock as _;
40+
use target_lexicon as _;
3541

3642
mod bindings;
3743
mod component;

0 commit comments

Comments
 (0)