Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove http from dependencies #1490

Merged
merged 2 commits into from Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions mithril-common/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mithril-common"
version = "0.2.160"
version = "0.2.161"
description = "Common types, interfaces, and utilities for Mithril nodes."
authors = { workspace = true }
edition = { workspace = true }
Expand Down Expand Up @@ -28,7 +28,6 @@ ed25519-dalek = { version = "2.1.0", features = ["rand_core", "serde"] }
fixed = "1.24.0"
glob = { version = "0.3.1", optional = true }
hex = "0.4.3"
http = { version = "0.2.9", optional = true }
jsonschema = { version = "0.17.1", optional = true }
kes-summed-ed25519 = { version = "0.2.1", features = [
"serde_enabled",
Expand Down Expand Up @@ -107,7 +106,7 @@ allow_skip_signer_certification = []
# Enable all tests tools
test_tools = ["apispec", "test_http_server", "random"]
# Enable tools to helps validate conformity to an OpenAPI specification
apispec = ["dep:glob", "dep:http", "dep:jsonschema", "dep:warp"]
apispec = ["dep:glob", "dep:jsonschema", "dep:warp"]
test_http_server = ["dep:warp"]

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions mithril-common/src/test_utils/apispec.rs
@@ -1,10 +1,10 @@
//! Tools to helps validate conformity to an OpenAPI specification

use glob::glob;
use http::response::Response;
use jsonschema::JSONSchema;
use serde::Serialize;
use serde_json::{json, Value, Value::Null};
use warp::http::Response;
use warp::hyper::body::Bytes;

use crate::era::SupportedEra;
Expand Down Expand Up @@ -190,8 +190,8 @@ impl<'a> APISpec<'a> {

#[cfg(test)]
mod tests {
use http::StatusCode;
use warp::http::Method;
use warp::http::StatusCode;

use super::*;
use crate::entities;
Expand Down
5 changes: 3 additions & 2 deletions mithril-test-lab/mithril-aggregator-fake/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mithril-aggregator-fake"
version = "0.1.2"
version = "0.1.3"
description = "Mithril Fake Aggregator for client testing"
authors = { workspace = true }
documentation = { workspace = true }
Expand All @@ -24,9 +24,10 @@ tracing = "0.1.40"
tracing-subscriber = "0.3.18"

[dev-dependencies]
http = "0.2.9"
mithril-common = { "path" = "../../mithril-common", features = [
"test_tools",
"random",
] }
reqwest = "0.11.23"
warp = "0.3.6"

16 changes: 8 additions & 8 deletions mithril-test-lab/mithril-aggregator-fake/src/application.rs
Expand Up @@ -89,13 +89,13 @@ impl Application {

#[cfg(test)]
mod tests {
use http::StatusCode;
use serde_json::Value::Null;
use std::time::Duration;
use tokio::{
task::{yield_now, JoinHandle},
time::sleep,
};
use warp::http::{Response, StatusCode};

use mithril_common::test_utils::apispec::APISpec;

Expand Down Expand Up @@ -144,7 +144,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down Expand Up @@ -173,7 +173,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down Expand Up @@ -202,7 +202,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down Expand Up @@ -238,7 +238,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down Expand Up @@ -290,7 +290,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down Expand Up @@ -345,7 +345,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down Expand Up @@ -394,7 +394,7 @@ mod tests {
path,
"application/json",
&Null,
&http::Response::new(response.bytes().await.unwrap()),
&Response::new(response.bytes().await.unwrap()),
);

Ok(())
Expand Down