]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Avoid daylight savings time issues in tests 1132/head
authorGreg Hudson <ghudson@mit.edu>
Sun, 1 Nov 2020 04:35:05 +0000 (00:35 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 3 Nov 2020 15:10:07 +0000 (10:10 -0500)
src/tests/t_kdcpolicy.py
src/tests/t_renew.py

index a44adfdb5e26263cd2e6d8b31bdb8b801831ff2f..924133388adff531b1411c997bdf8184a26cc5e6 100644 (file)
@@ -12,6 +12,10 @@ kdc_conf = {'realms': {'$realm': {'default_principal_flags': '+preauth',
                                   'max_renewable_life': '1d'}}}
 realm = K5Realm(krb5_conf=krb5_conf, kdc_conf=kdc_conf)
 
+# We will be scraping timestamps from klist to compute lifetimes, so
+# use a time zone with no daylight savings time.
+realm.env['TZ'] = 'UTC'
+
 realm.run([kadminl, 'addprinc', '-pw', password('fail'), 'fail'])
 
 def verify_time(out, target_time):
index 1630345c89ef26581330463d427df35fb6001e05..9f22bab821facfdb357472460b2844cda41f48cb 100755 (executable)
@@ -5,6 +5,10 @@ import re
 conf = {'realms': {'$realm': {'max_life': '20h', 'max_renewable_life': '20h'}}}
 realm = K5Realm(create_host=False, get_creds=False, kdc_conf=conf)
 
+# We will be scraping timestamps from klist to compute lifetimes, so
+# use a time zone with no daylight savings time.
+realm.env['TZ'] = 'UTC'
+
 def test(testname, life, rlife, exp_life, exp_rlife, env=None):
     global realm
     flags = ['-l', life]