summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock53
-rw-r--r--mullvad-api/Cargo.toml6
2 files changed, 58 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c85c6b6f08..599621943c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -173,6 +173,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
+name = "assert-json-diff"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
name = "async-stream"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -593,6 +603,16 @@ dependencies = [
]
[[package]]
+name = "colored"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
+dependencies = [
+ "lazy_static",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
name = "combine"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1067,7 +1087,7 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee"
dependencies = [
- "colored",
+ "colored 1.9.4",
"log",
]
@@ -2322,6 +2342,30 @@ dependencies = [
]
[[package]]
+name = "mockito"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "652cd6d169a36eaf9d1e6bce1a221130439a966d7f27858af66a33a66e9c4ee2"
+dependencies = [
+ "assert-json-diff",
+ "bytes",
+ "colored 2.2.0",
+ "futures-util",
+ "http 1.1.0",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "log",
+ "rand 0.8.5",
+ "regex",
+ "serde_json",
+ "serde_urlencoded",
+ "similar",
+ "tokio",
+]
+
+[[package]]
name = "mullvad-api"
version = "0.0.0"
dependencies = [
@@ -2336,6 +2380,7 @@ dependencies = [
"ipnetwork",
"libc",
"log",
+ "mockito",
"mullvad-encrypted-dns-proxy",
"mullvad-fs",
"mullvad-types",
@@ -4115,6 +4160,12 @@ dependencies = [
]
[[package]]
+name = "similar"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
+
+[[package]]
name = "simple-signal"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/mullvad-api/Cargo.toml b/mullvad-api/Cargo.toml
index a822593600..fc9d7d899b 100644
--- a/mullvad-api/Cargo.toml
+++ b/mullvad-api/Cargo.toml
@@ -45,6 +45,7 @@ shadowsocks = { workspace = true, features = [ "stream-cipher" ] }
[dev-dependencies]
talpid-time = { path = "../talpid-time", features = ["test"] }
tokio = { workspace = true, features = ["test-util", "time"] }
+mockito = "1.6.1"
[build-dependencies]
cbindgen = { version = "0.24.3", default-features = false }
@@ -55,3 +56,8 @@ uuid = { version = "1.4.1", features = ["v4"] }
[lib]
crate-type = [ "rlib", "staticlib" ]
bench = false
+
+[[test]]
+name = "ffi"
+# required-features = [ "api-override" ]
+features = [ "api-override" ]