]> git.g-eek.se Git - interimap.git/commitdiff
tests/run: use the current date as Message-ID in `sample_message`.
authorGuilhem Moulin <guilhem@fripost.org>
Tue, 28 May 2019 14:46:41 +0000 (16:46 +0200)
committerGuilhem Moulin <guilhem@fripost.org>
Tue, 28 May 2019 14:46:41 +0000 (16:46 +0200)
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.

tests/run

index 91319f38ddcb9f049c4f2982141249041ccd97a9..fca49190028d392a427ac009f9e7a09c0c98cdd8 100755 (executable)
--- 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)"