Skip to content

Commit

Permalink
fix: Fixed test to actually use config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Isawan committed Feb 6, 2024
1 parent 442d60d commit 0231bf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions integration/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mod util;

use std::{
net::{IpAddr, Ipv6Addr, SocketAddr},
path::Path,
process::Stdio,
str::from_utf8,
time::Duration,
Expand Down Expand Up @@ -92,15 +93,14 @@ fn test_end_to_end_terraform_flow(_: PoolOptions<Postgres>, 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())
Expand Down
2 changes: 1 addition & 1 deletion src/http/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0231bf0

Please sign in to comment.