commit 53e8bf4cb0c040047f41306f7f36ac930db120b0
parent 1ecadc3952d9f9a85e18e83da9b0fef7ffbcb905
Author: James Prestwood <prestwoj@gmail.com>
Date: Fri, 24 Jun 2022 16:07:37 -0700
auto-t: fix testEncryptedProfiles mtime check
Yet another weird UML quirk. The intent of this tests was to ensure
the profile gets encrypted, and to check this both the mtime and
contents of the profile were checked.
But under UML the profile is copied, IWD started, and the profile
is encrypted all without any time passing. The (same) mtime was
then updated without any changes which fails the mtime check.
This puts a sleep after copying the profile to ensure the system
time differs once IWD encrypts the profile.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/autotests/testEncryptedProfiles/connection_test.py b/autotests/testEncryptedProfiles/connection_test.py
@@ -6,6 +6,7 @@ import sys
sys.path.append('../util')
import iwd
import os
+from time import sleep
from iwd import IWD
from iwd import NetworkType
from iwd import PSKAgent
@@ -48,6 +49,8 @@ class Test(unittest.TestCase):
mtime = os.path.getmtime('/tmp/iwd/' + 'ssidCCMP.psk')
self.assertFalse(self.profile_is_encrypted('ssidCCMP.psk'))
+ sleep(1)
+
wd = IWD(True)
# Make sure profile was accepted