Skip to content

Commit

Permalink
remove println statements in hope to improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson committed Sep 27, 2024
1 parent df7c272 commit f675dea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
# Start the operator in the background
cargo run > operator-output.txt 2>&1 &
# Run the tests
cargo test --jobs 1 -- --ignored --nocapture
cargo test -- --ignored --nocapture
- name: Debugging information
if: always()
run: |
Expand Down
18 changes: 10 additions & 8 deletions tembo-operator/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ mod test {
// Assert no tables found
let result =
psql_with_retry(context.clone(), coredb_resource.clone(), "\\dt".to_string()).await;
println!("psql out: {}", result.stdout.clone().unwrap());
// println!("psql out: {}", result.stdout.clone().unwrap());
assert!(!result.stdout.clone().unwrap().contains("customers"));

let result = psql_with_retry(
Expand All @@ -1341,13 +1341,13 @@ mod test {
.to_string(),
)
.await;
println!("{}", result.stdout.clone().unwrap());
// println!("{}", result.stdout.clone().unwrap());
assert!(result.stdout.clone().unwrap().contains("CREATE TABLE"));

// Assert table 'customers' exists
let result =
psql_with_retry(context.clone(), coredb_resource.clone(), "\\dt".to_string()).await;
println!("{}", result.stdout.clone().unwrap());
// println!("{}", result.stdout.clone().unwrap());
assert!(result.stdout.clone().unwrap().contains("customers"));

let result = wait_until_psql_contains(
Expand All @@ -1359,14 +1359,15 @@ mod test {
)
.await;

println!("{}", result.stdout.clone().unwrap());
// println!("{}", result.stdout.clone().unwrap());
assert!(result.stdout.clone().unwrap().contains("aggs_for_vecs"));

// Check for metrics and availability
let metric_name = format!("cnpg_collector_up{{cluster=\"{}\"}} 1", name);
match wait_for_metric(pods.clone(), pod_name.to_string(), &metric_name).await {
Ok(result_stdout) => {
println!("Metric found: {}", result_stdout);
Ok(_result_stdout) => {
println!("Metric found for: {}", pod_name);
// println!("Metrics: {}", result_stdout);
}
Err(e) => {
panic!("Failed to find metric: {}", e);
Expand All @@ -1375,8 +1376,9 @@ mod test {

// Look for the custom metric
match wait_for_metric(pods.clone(), pod_name.to_string(), &test_metric_decr).await {
Ok(result_stdout) => {
println!("Metric found: {}", result_stdout);
Ok(_result_stdout) => {
println!("Metric found for: {}", pod_name);
// println!("Metrics: {}", result_stdout);
}
Err(e) => {
panic!("Failed to find metric: {}", e);
Expand Down

0 comments on commit f675dea

Please sign in to comment.