summaryrefslogtreecommitdiffstats
path: root/distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:26:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:26:00 +0000
commit830407e88f9d40d954356c3754f2647f91d5c06a (patch)
treed6a0ece6feea91f3c656166dbaa884ef8a29740e /distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml
parentInitial commit. (diff)
downloadknot-resolver-830407e88f9d40d954356c3754f2647f91d5c06a.tar.xz
knot-resolver-830407e88f9d40d954356c3754f2647f91d5c06a.zip
Adding upstream version 5.6.0.upstream/5.6.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml')
-rw-r--r--distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml24
1 files changed, 24 insertions, 0 deletions
diff --git a/distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml b/distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml
new file mode 100644
index 0000000..32cf295
--- /dev/null
+++ b/distro/tests/ansible-roles/knot_resolver/tasks/test_doh2.yaml
@@ -0,0 +1,24 @@
+---
+# SPDX-License-Identifier: GPL-3.0-or-later
+- name: doh2_test check kdig https support
+ shell: kdig --help | grep -q '+\S*https'
+ register: kdig_https
+ ignore_errors: true
+
+- name: doh2_test query localhost. A
+ # use curl instead of ansible builtins (get_url/uri)
+ # because they currently use unsupported HTTP/1.1
+ shell: |
+ curl -k -o /tmp/doh_test https://127.0.0.1:44354/doh?dns=1Y0BAAABAAAAAAAACWxvY2FsaG9zdAAAAQAB
+ echo "e5c2710e6ecb78c089ab608ad5861b87be0d1c623c4d58b4eee3b21c06aa2008 /tmp/doh_test" > /tmp/doh_test.sha256
+ sha256sum --check /tmp/doh_test.sha256
+ args:
+ # disable warning about using curl - we know what we're doing
+ warn: false
+ when: kdig_https is failed
+
+- name: doh2_test kdig localhost. A
+ shell: |
+ kdig @127.0.0.1 -p 44354 +https nic.cz || exit 1
+ kdig @127.0.0.1 -p 44354 +https-get nic.cz || exit 2
+ when: kdig_https is succeeded