1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-09-16 09:26:30 +02:00

tests: fixes for time_stamp module

This commit is contained in:
Grigory Smolkin
2020-12-03 12:23:33 +03:00
parent b6ce030d36
commit 7ddf8ee18a

View File

@@ -49,8 +49,14 @@ class CheckTimeStamp(ProbackupTest, unittest.TestCase):
show_backup = show_backup + self.show_pb(backup_dir, 'node')
i += 1
print(show_backup[1]['id'])
print(show_backup[2]['id'])
self.assertTrue(show_backup[1]['id'] == show_backup[2]['id'], "ERROR: Localtime format using instead of UTC")
output = self.show_pb(backup_dir, as_json=False, as_text=True)
self.assertNotIn("backup ID in control file", output)
node.stop()
# Clean after yourself
self.del_test_dir(module_name, fname)
@@ -92,7 +98,7 @@ class CheckTimeStamp(ProbackupTest, unittest.TestCase):
node.slow_start()
print(subprocess.Popen(
['sudo', 'timedatectl', 'set-timezone', 'US/Detroit'],
['sudo', 'timedatectl', 'set-timezone', 'America/Detroit'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate())
@@ -168,7 +174,7 @@ class CheckTimeStamp(ProbackupTest, unittest.TestCase):
node.slow_start()
subprocess.Popen(
['sudo', 'timedatectl', 'set-timezone', 'US/Detroit'],
['sudo', 'timedatectl', 'set-timezone', 'America/Detroit'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()