Skip to content

Commit

Permalink
Sigh
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Sep 13, 2024
1 parent 349efe7 commit 6fe4fb7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/agones/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ pub fn gameserver_address(gs: &GameServer) -> String {
// Useful for determining why something is failing in CI without having to run a cluster.
// Requires quilkin::test::enable_log("agones=debug"); to enable debug logging within
// the test
pub async fn debug_pods(client: &Client, labels: Option<String>) {
pub async fn debug_pods(client: &Client, labels: String) {
debug!(labels, "🪓 Debug output for Selector");
let pods: Api<Pod> = client.namespaced_api();
let events: Api<Event> = client.namespaced_api();
Expand All @@ -698,7 +698,7 @@ pub async fn debug_pods(client: &Client, labels: Option<String>) {
let event_list = events.list(&params).await.unwrap();
let pod_list = pods
.list(&ListParams {
label_selector: labels,
label_selector: Some(labels),
..Default::default()
})
.await
Expand Down
6 changes: 3 additions & 3 deletions crates/agones/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ mod tests {
.await
.is_err()
{
debug_pods(&client, Some(format!("role={PROXY_DEPLOYMENT}"))).await;
debug_pods(&client, format!("role={PROXY_DEPLOYMENT}")).await;
panic!("Quilkin proxy deployment should be ready");
}

Expand Down Expand Up @@ -157,8 +157,8 @@ mod tests {
}
}
if !failed {
debug_pods(&client, Some(format!("role={PROXY_DEPLOYMENT}"))).await;
debug_pods(&client, Some("role=xds".into())).await;
debug_pods(&client, format!("role={PROXY_DEPLOYMENT}")).await;
debug_pods(&client, "role=xds".into()).await;
}
assert!(failed, "Packet should have failed");

Expand Down
10 changes: 7 additions & 3 deletions crates/agones/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ mod tests {
.await
.is_err()
{
debug_pods(&client, None).await;
debug_pods(&client, format!("role={relay_proxy_name}")).await;
debug_pods(&client, "role=xds".into()).await;
debug_pods(&client, "role=agent".into()).await;
panic!("Quilkin proxy deployment should be ready");
}

Expand Down Expand Up @@ -171,7 +173,9 @@ mod tests {
}
}
if !failed {
debug_pods(&client, None).await;
debug_pods(&client, format!("role={relay_proxy_name}")).await;
debug_pods(&client, "role=xds".into()).await;
debug_pods(&client, "role=agent".into()).await;
}
assert!(failed, "Packet should have failed");

Expand Down Expand Up @@ -392,7 +396,7 @@ mod tests {
)
.await;
if result.is_err() {
debug_pods(client, Some("role=agent".into())).await;
debug_pods(client, Some("role=agent".into())(.await;
panic!("Agent Deployment should be ready");
}
result.unwrap().expect("Should have an agent deployment");
Expand Down

0 comments on commit 6fe4fb7

Please sign in to comment.