Skip to content

Commit

Permalink
prepend "oxide-token-"?
Browse files Browse the repository at this point in the history
  • Loading branch information
iliana committed Dec 6, 2023
1 parent c65a280 commit 69ef20f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions end-to-end-tests/src/bin/cli_wrapper.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use anyhow::{Context, Result};
use end_to_end_tests::helpers::ctx::{ClientParams, E2E_TLS_CERT_ENV};
use std::collections::HashMap;
use std::os::unix::process::CommandExt;
use std::process::Command;

Expand All @@ -14,14 +13,16 @@ async fn main() -> Result<Unreachable> {
let client_params = ClientParams::new()?;
let mut cmd = Command::new(cli_path);
cmd.env("OXIDE_HOST", client_params.base_url());
cmd.env("OXIDE_TOKEN", client_params.get_session_token().await?);
cmd.env(
"OXIDE_TOKEN",
format!("oxide-token-{}", client_params.get_session_token().await?),
);
cmd.arg("--debug");
cmd.arg("--resolve").arg(client_params.cli_resolve_arg().await?);
if let Some(cert_path) = std::env::var_os(E2E_TLS_CERT_ENV) {
cmd.arg("--cacert").arg(cert_path);
}
cmd.args(args);
eprintln!("exec: {:?}", cmd);
eprintln!("env: {:?}", cmd.get_envs().collect::<HashMap<_, _>>());
Err(cmd.exec().into())
}

0 comments on commit 69ef20f

Please sign in to comment.