diff options
author | Libor Peltan <libor.peltan@nic.cz> | 2024-07-31 10:50:17 +0200 |
---|---|---|
committer | Libor Peltan <libor.peltan@nic.cz> | 2024-07-31 10:50:17 +0200 |
commit | 46b621895a1e4d870195ad55fffaf8d652d11958 (patch) | |
tree | 469659914292b8788afe8e7c1a7c7969c30be249 /tests-extra | |
parent | Merge branch 'knsupdate_params' into 'master' (diff) | |
download | knot-46b621895a1e4d870195ad55fffaf8d652d11958.tar.xz knot-46b621895a1e4d870195ad55fffaf8d652d11958.zip |
test: ensure distinct random labels
Diffstat (limited to 'tests-extra')
-rw-r--r-- | tests-extra/tests/ddns/bulk/test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests-extra/tests/ddns/bulk/test.py b/tests-extra/tests/ddns/bulk/test.py index 6bd5bc6c2..f132ef7e6 100644 --- a/tests-extra/tests/ddns/bulk/test.py +++ b/tests-extra/tests/ddns/bulk/test.py @@ -9,6 +9,8 @@ import random import threading import time +RND_LABEL_ORD = 0 + def send_update(up): try: up.try_send() @@ -20,7 +22,9 @@ def send_up_bg(up): time.sleep(0.2) def rnd_label(): # including trailing dot - return str(zone_generate.main(["-n", "1"])).rstrip() + global RND_LABEL_ORD + RND_LABEL_ORD += 1 + return ("%04d_" % RND_LABEL_ORD) + str(zone_generate.main(["-n", "1"])).rstrip()[-32:] def check_faulty_update(faulty_up, server, zone, expect_fail, expect_faulty): test_rr = rnd_label() + "." + zone.name |