summaryrefslogtreecommitdiff
path: root/tests/util/server/src/lib.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-10-24 18:06:17 -0400
committerGitHub <noreply@github.com>2024-10-24 22:06:17 +0000
commite16230624747eccea7636b20b952df5899719336 (patch)
tree9a8ed7a52ca7042877101425e67a086f562f29ad /tests/util/server/src/lib.rs
parent8dd6177c624649d75ffcacca77e7c4f48cea07a2 (diff)
chore: remove print debugging from test server (#26529)
Accidentally added in https://github.com/denoland/deno/pull/26473/files
Diffstat (limited to 'tests/util/server/src/lib.rs')
-rw-r--r--tests/util/server/src/lib.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/util/server/src/lib.rs b/tests/util/server/src/lib.rs
index e4a2cc02e..67dbcd820 100644
--- a/tests/util/server/src/lib.rs
+++ b/tests/util/server/src/lib.rs
@@ -1,8 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-#![allow(clippy::print_stdout)]
-#![allow(clippy::print_stderr)]
-
use std::collections::HashMap;
use std::env;
use std::io::Write;
@@ -302,7 +299,10 @@ async fn get_tcp_listener_stream(
.collect::<Vec<_>>();
// Eye catcher for HttpServerCount
- println!("ready: {name} on {:?}", addresses);
+ #[allow(clippy::print_stdout)]
+ {
+ println!("ready: {name} on {:?}", addresses);
+ }
futures::stream::select_all(listeners)
}
@@ -345,7 +345,10 @@ struct HttpServerStarter {
impl Default for HttpServerStarter {
fn default() -> Self {
- println!("test_server starting...");
+ #[allow(clippy::print_stdout)]
+ {
+ println!("test_server starting...");
+ }
let mut test_server = Command::new(test_server_path())
.current_dir(testdata_path())
.stdout(Stdio::piped())
@@ -360,7 +363,6 @@ impl Default for HttpServerStarter {
let mut ready_count = 0;
for maybe_line in lines {
if let Ok(line) = maybe_line {
- eprintln!("LINE: {}", line);
if line.starts_with("ready:") {
ready_count += 1;
}
@@ -480,6 +482,7 @@ pub fn run_collect(
} = prog.wait_with_output().expect("failed to wait on child");
let stdout = String::from_utf8(stdout).unwrap();
let stderr = String::from_utf8(stderr).unwrap();
+ #[allow(clippy::print_stderr)]
if expect_success != status.success() {
eprintln!("stdout: <<<{stdout}>>>");
eprintln!("stderr: <<<{stderr}>>>");
@@ -540,6 +543,7 @@ pub fn run_and_collect_output_with_args(
} = deno.wait_with_output().expect("failed to wait on child");
let stdout = String::from_utf8(stdout).unwrap();
let stderr = String::from_utf8(stderr).unwrap();
+ #[allow(clippy::print_stderr)]
if expect_success != status.success() {
eprintln!("stdout: <<<{stdout}>>>");
eprintln!("stderr: <<<{stderr}>>>");
@@ -564,6 +568,7 @@ pub fn deno_cmd_with_deno_dir(deno_dir: &TempDir) -> TestCommandBuilder {
.env("JSR_URL", jsr_registry_unset_url())
}
+#[allow(clippy::print_stdout)]
pub fn run_powershell_script_file(
script_file_path: &str,
args: Vec<&str>,
@@ -655,6 +660,7 @@ impl<'a> CheckOutputIntegrationTest<'a> {
}
pub fn wildcard_match(pattern: &str, text: &str) -> bool {
+ #[allow(clippy::print_stderr)]
match wildcard_match_detailed(pattern, text) {
WildcardMatchResult::Success => true,
WildcardMatchResult::Fail(debug_output) => {