From 2900aea02ffe35ad3566e28a4aabe14bd060b854 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 27 Sep 2024 17:07:41 +0200 Subject: test: make them pass on RHEL/Centos Stream 9 The dig version there doesn't print the protocol in the output and it is not really that important to check as we assume that dig +tcp does the right thing anyway. Signed-off-by: Paul Holzinger --- test/100-basic-name-resolution.bats | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/100-basic-name-resolution.bats b/test/100-basic-name-resolution.bats index b396eb1..2006c28 100644 --- a/test/100-basic-name-resolution.bats +++ b/test/100-basic-name-resolution.bats @@ -89,7 +89,9 @@ load helpers run_in_container_netns "$a1_pid" "dig" "+tcp" "google.com" "@$gw" # validate that we get an ipv4 assert "$output" =~ "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+" - assert "$output" =~ "\(TCP\)" "server used TCP" + # TODO This is not working on rhel/centos 9 as the dig version there doesn't print the line, + # so we trust that dig +tcp does the right thing. + # assert "$output" =~ "\(TCP\)" "server used TCP" # Set recursion bit is already set if requested so output must not # contain unexpected warning. assert "$output" !~ "WARNING: recursion requested but not available" -- cgit v1.2.3-70-g09d2 From fb501cfac46ac2068d81df42f3b3acdc97cc4e12 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 27 Sep 2024 17:39:26 +0200 Subject: fix new lint error with rust 1.81 Signed-off-by: Paul Holzinger --- src/server/serve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/serve.rs b/src/server/serve.rs index 261ba6b..c657cf9 100644 --- a/src/server/serve.rs +++ b/src/server/serve.rs @@ -385,7 +385,7 @@ fn parse_resolv_conf(content: &str) -> AardvarkResult> { let mut nameservers: Vec = Vec::new(); for line in content.split('\n') { // split of comments - let line = match line.split_once(|s| s == '#' || s == ';') { + let line = match line.split_once(['#', ';']) { Some((f, _)) => f, None => line, }; -- cgit v1.2.3-70-g09d2