Skip to content

Commit

Permalink
Merge pull request #577 from djach7/remove_users_crate
Browse files Browse the repository at this point in the history
fix: integration-tests: remove users crate
  • Loading branch information
mergify[bot] authored Nov 27, 2023
2 parents 913490d + 574d4e4 commit 71624ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ serde_json = "1.0"
pretty_assertions = "1.0.0"
paste = "1.0"
pem = "2.0"
users = "0.11.0"

fdo-data-formats = { path = "../data-formats" }
fdo-util = { path = "../util" }
14 changes: 6 additions & 8 deletions integration-tests/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,21 +808,19 @@ impl<'a> TestServerConfigurator<'a> {
&self.test_context.runner_path(&self.server_number),
);

let output = Command::new("whoami").output().unwrap();

let cur_user = String::from_utf8(output.stdout).unwrap();

if !per_device {
L.l("per_device_serviceinfo is not set, using default values");
cfg.insert(
"user",
users::get_current_username().unwrap().to_str().unwrap(),
);
cfg.insert("user", &cur_user);
cfg.insert("sshkey1", "ssh-ed25519 sshkey_default [email protected]");
cfg.insert("sshkey2", "ssh-ed25519 sshkey_default [email protected]");
cfg.insert("password", "testpassword");
} else {
L.l("per_device_serviceinfo is set, using device specific values");
cfg.insert(
"user",
users::get_current_username().unwrap().to_str().unwrap(),
);
cfg.insert("user", &cur_user);
cfg.insert("sshkey1", "ssh-ed25519 sshkey_per_device [email protected]");
cfg.insert("sshkey2", "ssh-ed25519 sshkey_per_device [email protected]");
cfg.insert("password", "testpassword");
Expand Down

0 comments on commit 71624ca

Please sign in to comment.