Commit 8a06ec30 authored by Štěpán Balážik's avatar Štěpán Balážik

wip

parent 76886f05
Pipeline #46294 failed with stage
in 2 minutes and 18 seconds
......@@ -44,6 +44,13 @@ test:unittests:
script:
- make check
# There are no tests in the repo which use this feature but others do
# and do not want to cause them breakage
test:sanity:raw_id:
<<: *test
script:
- ci/raw_id_check.sh
# changes in Deckard itself must not change result of tests
test:comparative:kresd:
<<: *test
......
#!/usr/bin/python3
import sys
import dns.message
from pydnstest import mock_client
q = dns.message.make_query("anything", "A")
qid = q.id.to_bytes(2, "big", signed=False)
sock = mock_client.setup_socket("1.2.3.4", 53)
mock_client.send_query(sock, q)
a = mock_client.get_answer(sock)
print(qid)
print(a)
if a == qid:
sys.exit(0)
else:
sys.exit(1)
#!/bin/bash
make depend
cat env.sh
source env.sh
export SOCKET_WRAPPER_DIR=/tmp
python3 -m pydnstest.testserver --scenario $(pwd)/tests/deckard_raw_id.rpl &
sleep 1
python3 -m ci.raw_id
\ No newline at end of file
stub-addr: 127.0.0.127
stub-addr: 1.2.3.4
CONFIG_END
SCENARIO_BEGIN Sanity check for Deckard's "ADJUST raw_id" option
RANGE_BEGIN 0 100
ADDRESS 127.0.0.127
ADDRESS 1.2.3.4
ENTRY_BEGIN
MATCH opcode
ADJUST raw_id
......
programs:
- name: raw_id
binary: python3
additional:
- ./tests/test_raw_id.py
binary: test_raw_id.py
additional: []
templates: []
configs: []
#!/usr/bin/python3
import ipaddress
import sys
import dns.message
sys.path.append("tools")
import answer_checker
q = dns.message.make_query("anything", "A")
answer_checker.send_and_check(q, q, ipaddress.ip_address("127.0.0.127"), {"id"})
......@@ -134,4 +134,3 @@ def test_udp_fragmentation_truncated(server):
server,
ALL - {"authority"},
unset_flags=[dns.flags.AD])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment