aboutsummaryrefslogtreecommitdiffstats
path: root/tests/run
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-05-28 16:46:41 +0200
committerGuilhem Moulin <guilhem@fripost.org>2019-05-28 16:46:41 +0200
commita07043f308ee91223b1048a6ca1c878c31b0f83a (patch)
treebdda06780d21e0da733f460319738dc29bb9b958 /tests/run
parent2761465d3bde7e326ffd3cb2c9bb480144f5a72d (diff)
tests/run: use the current date as Message-ID in `sample_message`.
A random 128-bit UUID obtained from /proc/sys/kernel/random/uuid works too but is Linux-specific and requires the proc(5) pseudo-filesystem to be mounted at /proc.
Diffstat (limited to 'tests/run')
-rwxr-xr-xtests/run5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/run b/tests/run
index 91319f3..fca4919 100755
--- a/tests/run
+++ b/tests/run
@@ -133,11 +133,12 @@ doveadm() {
# Sample (random) message
sample_message() {
+ local date="$(date +"%s.%N")"
cat <<-EOF
From: <sender@example.net>
To: <recipient@example.net>
- Date: $(date -R)
- Message-ID: <$(< /proc/sys/kernel/random/uuid)@example.net>
+ Date: $(date -R -d@"$date")
+ Message-ID: <$date@example.net>
EOF
local len="$(shuf -i1-4096 -n1)"