-
Notifications
You must be signed in to change notification settings - Fork 0
Fix spurious failures in the ssh_identities test #35
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -171,6 +171,8 @@ impl IdentityError { | |||||
|
|
||||||
| #[cfg(test)] | ||||||
| mod test { | ||||||
| use std::time::Duration; | ||||||
|
|
||||||
| use sush_common::codephrases::{PHRASE_WORDS_ID, WORD_SEPARATOR, generate_id}; | ||||||
| use tempfile::TempDir; | ||||||
| use tokio::process::Command; | ||||||
|
|
@@ -202,6 +204,14 @@ mod test { | |||||
| .spawn() | ||||||
| .expect("failed to spawn ssh-agent"); | ||||||
|
|
||||||
| // Wait for the agent to start up. | ||||||
| for _ in 0..20 { | ||||||
| if sock.exists() { | ||||||
| break; | ||||||
| } | ||||||
| tokio::time::sleep(Duration::from_millis(100)).await; | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, I meant tokio, sorry. |
||||||
| } | ||||||
|
|
||||||
| let status = Command::new("ssh-add") | ||||||
| .arg(&key) | ||||||
| .env("SSH_AUTH_SOCK", &sock) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.