summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoropenshift-merge-bot[bot] <148852131+openshift-merge-bot[bot]@users.noreply.github.com>2024-09-30 09:47:43 +0000
committerGitHub <noreply@github.com>2024-09-30 09:47:43 +0000
commitebd73686aa9b71985c9a2cd2697dfc88ee0b02bd (patch)
tree0bcc41d6c8bc14ea9fce6d01ea7884ee5645c4f5
parentfda45dac5fce00b442c4dc8cee8c39e2564dc0fc (diff)
parentfb501cfac46ac2068d81df42f3b3acdc97cc4e12 (diff)
Merge pull request #519 from Luap99/packit-failuresHEADmain
test: make them pass on RHEL/Centos Stream 9
-rw-r--r--src/server/serve.rs2
-rw-r--r--test/100-basic-name-resolution.bats4
2 files changed, 4 insertions, 2 deletions
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<Vec<IpAddr>> {
let mut nameservers: Vec<IpAddr> = 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,
};
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"