From 26a75c6463f626945849b92e6165f12d4bee5f32 Mon Sep 17 00:00:00 2001 From: zak905 Date: Tue, 30 Apr 2024 15:05:11 +0200 Subject: [PATCH 1/2] randomize record content in le_test_dnsapi --- letest.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/letest.sh b/letest.sh index 469dca7c3..250cc3ba9 100755 --- a/letest.sh +++ b/letest.sh @@ -1501,8 +1501,9 @@ le_test_dnsapi() { _initpath $TestingDomain addcommand="${api}_add" rmcommand="${api}_rm" - _assertcmd "$addcommand acmetestXyzRandomName.$TestingDomain acmeTestTxtRecord" || return - _assertcmd "$rmcommand acmetestXyzRandomName.$TestingDomain acmeTestTxtRecord" || return + record_content="acmeTestTxtRecord_$(date +%N)" + _assertcmd "$addcommand acmetestXyzRandomName.$TestingDomain $record_content" || return + _assertcmd "$rmcommand acmetestXyzRandomName.$TestingDomain $record_content" || return ) || return } From c39e3d108ecac7d7f891ea5064f2e556ef6cd58b Mon Sep 17 00:00:00 2001 From: zak905 Date: Fri, 3 May 2024 16:59:32 +0200 Subject: [PATCH 2/2] use /dev/urandom to generate random instead of date --- letest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/letest.sh b/letest.sh index 250cc3ba9..6dafd4499 100755 --- a/letest.sh +++ b/letest.sh @@ -1501,7 +1501,8 @@ le_test_dnsapi() { _initpath $TestingDomain addcommand="${api}_add" rmcommand="${api}_rm" - record_content="acmeTestTxtRecord_$(date +%N)" + random_string="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c10)" + record_content="acmeTestTxtRecord_$random_string" _assertcmd "$addcommand acmetestXyzRandomName.$TestingDomain $record_content" || return _assertcmd "$rmcommand acmetestXyzRandomName.$TestingDomain $record_content" || return ) || return