-
-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rust): simplify
node create
execution
- Loading branch information
1 parent
441bacf
commit 2ddf8ac
Showing
28 changed files
with
661 additions
and
537 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
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
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 |
---|---|---|
|
@@ -21,6 +21,16 @@ use tempfile::NamedTempFile; | |
/// it sets up some global spans / logs exporters that might interact with other tests | ||
#[test] | ||
fn test_create_journey_event() { | ||
let cli = Executor::execute_future(async { | ||
let db_file = NamedTempFile::new().unwrap(); | ||
let cli_state_directory = db_file.path().parent().unwrap().join(random_name()); | ||
CliState::create(cli_state_directory) | ||
.await | ||
.unwrap() | ||
.set_tracing_enabled(true) | ||
}) | ||
.unwrap(); | ||
|
||
let spans_exporter = InMemorySpanExporter::default(); | ||
let logs_exporter = InMemoryLogsExporter::default(); | ||
|
||
|
@@ -30,7 +40,7 @@ fn test_create_journey_event() { | |
&LoggingConfiguration::off() | ||
.unwrap() | ||
.set_crates(&["ockam_api"]), | ||
&ExportingConfiguration::foreground().unwrap(), | ||
&ExportingConfiguration::foreground(&cli).unwrap(), | ||
"test", | ||
None, | ||
); | ||
|
@@ -40,13 +50,6 @@ fn test_create_journey_event() { | |
|
||
Executor::execute_future( | ||
async move { | ||
let db_file = NamedTempFile::new().unwrap(); | ||
let cli_state_directory = db_file.path().parent().unwrap().join(random_name()); | ||
let cli = CliState::create(cli_state_directory) | ||
.await | ||
.unwrap() | ||
.set_tracing_enabled(true); | ||
|
||
let mut map = HashMap::new(); | ||
map.insert(USER_EMAIL, "[email protected]".to_string()); | ||
map.insert(USER_NAME, "eric".to_string()); | ||
|
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
Oops, something went wrong.