-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
85 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ name = "sqrl_bench" | |
harness = false | ||
|
||
[features] | ||
default = ["replication"] | ||
replication = [] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
use assert_cmd::prelude::*; | ||
use std::process::Command; | ||
use tempfile::TempDir; | ||
|
||
#[test] | ||
fn replicated_setup() { | ||
let temp_dir = TempDir::new().unwrap(); | ||
let mut cmd = Command::cargo_bin("sqrl-server").unwrap(); | ||
cmd.args(["--replication-mode", "leader", "--addr", "127.0.0.1:7000"]) | ||
.current_dir(&temp_dir).assert().success(); | ||
} | ||
//use assert_cmd::prelude::*; | ||
//use std::process::Command; | ||
//use tempfile::TempDir; | ||
// | ||
//#[test] | ||
//fn replicated_setup() { | ||
// println!("Starting follower_one"); | ||
// let mut follower_one = Command::cargo_bin("sqrl-server").unwrap(); | ||
// follower_one | ||
// .args(["--addr", "127.0.0.1:7001"]) | ||
// .current_dir(&TempDir::new().unwrap()) | ||
// .assert() | ||
// .success(); | ||
// | ||
// println!("Starting follower_two"); | ||
// let mut follower_two = Command::cargo_bin("sqrl-server").unwrap(); | ||
// follower_two | ||
// .args(["--addr", "127.0.0.1:7002"]) | ||
// .current_dir(&TempDir::new().unwrap()) | ||
// .assert() | ||
// .success(); | ||
// let mut replication_server = Command::cargo_bin("sqrl-server").unwrap(); | ||
// replication_server | ||
// .args([ | ||
// "--replication-mode", | ||
// "leader", | ||
// "--addr", | ||
// "127.0.0.1:7000", | ||
// "--followers", | ||
// "127.0.0.1:7001,127.0.0.1:7002", | ||
// ]) | ||
// .current_dir(&TempDir::new().unwrap()) | ||
// .assert() | ||
// .success(); | ||
//} |