From 0231bf080e0d3563a8966281696a763694cab314 Mon Sep 17 00:00:00 2001 From: Isawan Millican Date: Tue, 6 Feb 2024 23:11:00 +0000 Subject: [PATCH] fix: Fixed test to actually use config file --- integration/main.rs | 8 ++++---- src/http/version.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration/main.rs b/integration/main.rs index 61b4d9e8..18abd441 100644 --- a/integration/main.rs +++ b/integration/main.rs @@ -3,6 +3,7 @@ mod util; use std::{ net::{IpAddr, Ipv6Addr, SocketAddr}, + path::Path, process::Stdio, str::from_utf8, time::Duration, @@ -92,15 +93,14 @@ fn test_end_to_end_terraform_flow(_: PoolOptions, db_options: PgConnec copy_dir("resources/test/terraform/random-import-stack", &folder) .expect("Could not copy folder"); let temp_folder = folder.path().to_str().expect("Could not get tempdir path"); + let config_path = format!("{temp_folder}/terraform.tfrc"); + assert!(Path::new(&config_path).exists()); let mut terraform = tokio::process::Command::new("terraform"); let process = terraform .arg(format!("-chdir={temp_folder}")) .arg("init") - .env( - "TF_CLI_CONFIG_FILE", - format!("{temp_folder}/terraform.tfrc"), - ) + .env("TF_CLI_CONFIG_FILE", config_path) .kill_on_drop(true) .stdout(Stdio::piped()) .stderr(Stdio::piped()) diff --git a/src/http/version.rs b/src/http/version.rs index 73c23d4c..a5bd97c1 100644 --- a/src/http/version.rs +++ b/src/http/version.rs @@ -72,7 +72,7 @@ fn archive_name(os: &str, arch: &str) -> String { fn build_url(base_url: String, id: i64) -> String { let mut s = base_url; - s.push_str("mirror/v1/artifacts/"); + s.push_str("artifacts/"); s.push_str(&id.to_string()); s }