From b7b2a3de6a56a97917d0e3b2fe2883eea1bf2b12 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sat, 25 Nov 2023 18:17:17 +0100 Subject: [PATCH] chore: add debug output and logging --- tests/e2e.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/e2e.rs b/tests/e2e.rs index 58b256b..0d45949 100644 --- a/tests/e2e.rs +++ b/tests/e2e.rs @@ -12,22 +12,24 @@ static FIREWALL_KEYVAULT: &str = "bvdbkeyweavetweukvt2"; static NON_EXISTENT_KEYVAULT: &str = "bvdbkeyweavetweukvt3"; fn azure_cli_login(client_id: String, tenant_id: String, subscription_id: String) -> Result<(), std::io::Error> { - Command::new("az") + println!("Executing 'az login' with client ID: {}", client_id); + let login_output = Command::new("az") .arg("login") .arg("--identity") .arg("--username") - .arg(client_id) + .arg(&client_id) .arg("--tenant") - .arg(tenant_id) + .arg(&tenant_id) .output()?; - - Command::new("az") + println!("Login output: {:?}", login_output); + println!("Executing 'az account set' with subscription ID: {}", subscription_id); + let account_output = Command::new("az") .arg("account") .arg("set") .arg("--subscription") - .arg(subscription_id) + .arg(&subscription_id) .output()?; - + println!("Account output: {:?}", account_output); Ok(()) }