Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
*~
*.html
*.log.*
.vscode
.DS_Store
13 changes: 0 additions & 13 deletions orion-configuration/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 6 additions & 6 deletions orion-lib/src/access_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Loading