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

Bump mockall from 0.8.3 to 0.10.2 #956

Merged
merged 3 commits into from
Sep 16, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion consensus/enclave/mock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ mc-transaction-core = { path = "../../../transaction/core" }
mc-util-from-random = { path = "../../../util/from-random" }
mc-util-serial = { path = "../../../util/serial" }

mockall = "0.8.3"
mockall = "0.10.2"
rand_core = "0.6"
rand_hc = "0.3"
4 changes: 2 additions & 2 deletions consensus/enclave/mock/src/mock_consensus_enclave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use mockall::*;

mock! {
pub ConsensusEnclave {} // This is used to generate a MockConsensusEnclave struct.
trait ConsensusEnclave {
impl ConsensusEnclave for ConsensusEnclave {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impl X for X feels weird, but if it works I'm not gonna complain.

Copy link
Contributor

@jcape jcape Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, totally with you on that one. They're silently adding a "Mock" prefix to everything, so if you want a MockConsensusEnclave to implement the ConsensusEnclave trait, this is how you have to do it.

fn enclave_init(
&self,
self_peer_id: &ResponderId,
Expand Down Expand Up @@ -79,7 +79,7 @@ mock! {
) -> ConsensusEnclaveResult<(Block, BlockContents, BlockSignature)>;
}

trait ReportableEnclave {
impl ReportableEnclave for ConsensusEnclave {
fn new_ereport(&self, qe_info: TargetInfo) -> SgxReportResult<(Report, QuoteNonce)>;

fn verify_quote(&self, quote: Quote, qe_report: Report) -> SgxReportResult<IasNonce>;
Expand Down
2 changes: 1 addition & 1 deletion consensus/scp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mc-util-serial = { path = "../../util/serial", features = ["std"] }

bigint = "4.4"
maplit = "1.0.2"
mockall = "0.8.3"
mockall = "0.10.2"
rand = "0.8"
rand_hc = "0.3"
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
Expand Down
2 changes: 1 addition & 1 deletion consensus/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mc-transaction-core-test-utils = { path = "../../transaction/core/test-utils" }
mc-util-from-random = { path = "../../util/from-random" }
mc-util-logger-macros = { path = "../../util/logger-macros" }

mockall = "0.8.3"
mockall = "0.10.2"
rand_core = { version = "0.6", default-features = false }
rand_hc = "0.3"
serial_test = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion fog/report/validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ mc-util-serial = { path = "../../../util/serial" }
mc-util-uri = { path = "../../../util/uri" }

displaydoc = { version = "0.2", default-features = false }
mockall = { version = "0.8.3", optional = true }
mockall = { version = "0.10.2", optional = true }
2 changes: 1 addition & 1 deletion ledger/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mc-util-serial = { path = "../../util/serial", features = ["std"] }
displaydoc = { version = "0.2", default-features = false }
lazy_static = "1.4"
lmdb-rkv = "0.14.0"
mockall = "0.8.3"
mockall = "0.10.2"
prost = { version = "0.8", default-features = false, features = ["prost-derive"] }
rand = { version = "0.8", optional = true }
rand_core = "0.6"
Expand Down
2 changes: 1 addition & 1 deletion ledger/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mc-util-uri = { path = "../../util/uri" }
crossbeam-channel = "0.5"
displaydoc = "0.2"
grpcio = "0.9.0"
mockall = "0.8.3"
mockall = "0.10.2"
protobuf = "2.22.1"
rand = "0.8"
reqwest = { version = "0.10" , features = ["rustls-tls"], default_features = false }
Expand Down
2 changes: 1 addition & 1 deletion peers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ crossbeam-channel = "0.5"
ed25519 = { version = "1.0.1", default-features = false, features = ["serde"] }
displaydoc = "0.2"
grpcio = "0.9.0"
mockall = "0.8.3"
mockall = "0.10.2"
protobuf = "2.22.1"
retry = "1.2"
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
Expand Down