diff --git a/.gitignore b/.gitignore index d6a8c164..4622854f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ *~ *.html *.log.* +.vscode +.DS_Store diff --git a/orion-configuration/src/config.rs b/orion-configuration/src/config.rs index 4baffae9..3bb53b5f 100644 --- a/orion-configuration/src/config.rs +++ b/orion-configuration/src/config.rs @@ -189,19 +189,6 @@ mod envoy_conversions { Options::from_path_to_envoy(path.clone()) })?; let serialized = serde_yaml::to_string(&new_conf)?; - tracing::info!("\n{serialized}\n"); - if !path.ends_with("new.yaml") { - let new_path = format!( - "../orion-proxy/conf/{}-new.yaml", - path.file_name() - .unwrap() - .to_str() - .unwrap() - .trim_end_matches(".yaml") - .replace("envoy-", "orion-") - ); - std::fs::write(new_path, serialized.as_bytes())?; - } let deserialized: Config = serde_yaml::from_str(&serialized)?; assert_eq!(new_conf, deserialized, "failed to roundtrip config transcoding"); } else { diff --git a/orion-lib/src/access_log.rs b/orion-lib/src/access_log.rs index b48a25cb..bd2aed33 100644 --- a/orion-lib/src/access_log.rs +++ b/orion-lib/src/access_log.rs @@ -254,18 +254,18 @@ mod tests { // initialize the logger pool with one channel for access log messages let handles = start_access_loggers(8, 100, Rotation::NEVER, 3); + let access_log_file = AccessLogConf::File("/tmp/test-access.log".into()); // send a new configuration for the logger(s) - update_configuration( - Target::Listener("test".into()), - vec![AccessLogConf::File("test-access.log".into()), AccessLogConf::Stderr], - ) - .await - .unwrap(); + update_configuration(Target::Listener("test".into()), vec![access_log_file, AccessLogConf::Stderr]) + .await + .unwrap(); let permit = log_access_reserve_single().await; // log the formatted message to file and stdout... log_access(permit, Target::Listener("test".into()), vec![message.clone(), message.clone()]); _ = timeout(Duration::from_secs(2), handles.join_all()).await; + // remove the log file after the test + let _ = std::fs::remove_file("/tmp/test-access.log"); } }