-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: repair telemetry processing (#64)
- Loading branch information
Showing
6 changed files
with
159 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use crate::common::{get_fixture, get_test_cmd}; | ||
use anyhow::Result; | ||
|
||
mod common; | ||
|
||
#[test] | ||
fn confirm_telemetry_flush() -> Result<()> { | ||
let (_temp_dir, temp_fixtures_root) = get_fixture("grit_modules", true)?; | ||
|
||
let mut cmd = get_test_cmd()?; | ||
cmd.env("GRIT_TELEMETRY_DISABLED", "false"); | ||
cmd.env("GRIT_TELEMETRY_FOREGROUND", "true"); | ||
cmd.arg("doctor").current_dir(temp_fixtures_root); | ||
|
||
let output = cmd.output()?; | ||
println!("output: {:?}", String::from_utf8(output.stdout.clone())?); | ||
|
||
assert!( | ||
output.status.success(), | ||
"Command didn't finish successfully" | ||
); | ||
|
||
// Confirm output flushed | ||
let output_str = String::from_utf8(output.stdout.clone())?; | ||
assert!(output_str.contains("Successfully sent event command-completed")); | ||
|
||
Ok(()) | ||
} |