How to write unit tests for dns-updates-allow-deny
Andreas Schneider
asn at samba.org
Mon Jun 20 15:26:00 UTC 2022
On Monday, June 20, 2022 1:43:51 AM CEST Matt Grant via samba-technical wrote:
> Hi!
>
> Have a draft merge request up at:
>
> https://gitlab.com/samba-team/samba/-/merge_requests/2271
>
> I am looking for someone to help me get the unit tests written for merging
> into Samba 4.17 please. (Uri Simchoni, are you available again please?)
>
> This has been around for some time, but I have finally got everything else
> to the point where I can get this done.
>
> Main issue is that I need to be able to do DNS requests from different
> source addresses into the SAMBA_INTERNAL DNS server in the test hook up.
> Currently python/samba/tests/dns_forwarder.py only does them from 127.0.0.1
> or ::1. Multiple sources are needed as the Samba test framework can only
> use a single smb.conf for a whole test run (as far as I understand it).
>
> How can we get:
>
> 1) multiple 192.168.x.x and IPv6 ULA addresses set up in the test framework?
The number of IP addresses is limited. The IP address used is determined by
SOCKET_WRAPPER_DEFAULT_IFACE.
If you change that variable, you will get a different IP address.
More details at:
https://gitlab.com/cwrap/socket_wrapper/-/blob/master/doc/socket_wrapper.
1.adoc
> 2) Create DNS requests from these addresses (probably simple once 1) is
> done)?
You can change the SOCKET_WRAPPER_DEFAULT_IFACE environment variable.
Note that several IP addresses are taken by different environments:
https://gitlab.com/samba-team/samba/-/blob/master/selftest/target/
Samba.pm#L596=
I hope that helps.
Andreas
--
Andreas Schneider asn at samba.org
Samba Team www.samba.org
GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
More information about the samba-technical
mailing list