File tree Expand file tree Collapse file tree 4 files changed +27
-4
lines changed
src/vit-testing/mainnet-tools/src Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,26 @@ mod command;
44pub mod fake;
55
66pub use command:: Command ;
7+ use std:: path:: { Path , PathBuf } ;
8+
9+ /// Cardano CLI mock. It can return arbitrary/fake data but preserves correct Cardano CLI format.
10+ #[ derive( Debug , Clone ) ]
11+ pub struct Mock {
12+ path : PathBuf ,
13+ }
14+
15+ impl Default for Mock {
16+ fn default ( ) -> Self {
17+ Self {
18+ path : Path :: new ( "cardano-cli-mock" ) . to_path_buf ( ) ,
19+ }
20+ }
21+ }
22+
23+ impl Mock {
24+ /// Path to mock cli
25+ #[ must_use]
26+ pub fn path ( & self ) -> PathBuf {
27+ self . path . clone ( )
28+ }
29+ }
Original file line number Diff line number Diff line change 11mod mock;
22mod wrapper;
33
4- pub use mock:: Command as MockCommand ;
4+ pub use mock:: { Mock , Command as MockCommand } ;
5+ pub use wrapper:: Api ;
Original file line number Diff line number Diff line change 1- #![ allow( dead_code) ]
2-
31pub mod cli;
42mod data;
53mod error;
64pub mod utils;
75
8- pub use cli:: { command :: * , Api } ;
6+ pub use cli:: Api ;
97pub use data:: CardanoKeyTemplate ;
108pub use error:: Error ;
Original file line number Diff line number Diff line change 66#[ macro_use]
77extern crate prettytable;
88
9+ #[ allow( dead_code) ]
910/// Cardano CLI wrapper and mock
1011pub mod cardano_cli;
1112/// Simple scheduler for transporting snapshot from snapshot trigger service to servicing station service
You can’t perform that action at this time.
0 commit comments