Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r8656366bd3aa42457b9ff6f96f09e22a8e6bc7df -rd2576094b112afa907b4ab03f3a21a1bfd193c0b --- shared/scripts/configuration/utility.py (.../utility.py) (revision 8656366bd3aa42457b9ff6f96f09e22a8e6bc7df) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision d2576094b112afa907b4ab03f3a21a1bfd193c0b) @@ -99,3 +99,18 @@ except: test.fail("Log file is not created or log file is not created based on standard log naming format.") + +def get_epoch_value_consistancy(current_epoch_value, expected_epoch_value): + + + maximum_epoch_value = current_epoch_value + 25 + minimum_epoch_value = current_epoch_value - 25 + test.log(str(current_epoch_value)) + test.log(str(expected_epoch_value)) + if expected_epoch_value > minimum_epoch_value and expected_epoch_value < maximum_epoch_value : + return True + return False + + + + Index: tst_cloud_sync - treatment_screen/test.py =================================================================== diff -u -r56d3408e2bce20bdbaad525bc91388fbc0130ccd -rd2576094b112afa907b4ab03f3a21a1bfd193c0b --- tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision 56d3408e2bce20bdbaad525bc91388fbc0130ccd) +++ tst_cloud_sync - treatment_screen/test.py (.../test.py) (revision d2576094b112afa907b4ab03f3a21a1bfd193c0b) @@ -17,6 +17,7 @@ import csv import names +import time import os from dialin.ui.hd_simulator import HDSimulator from dialin.ui import utils @@ -76,7 +77,11 @@ """ test.startSection("Verification of cloud response for code %s" %actual_cloudsync_data[config.CODE_INDEX]) expected_cloudsync_data = expected_cloudsync_data.split(',') - for index in (config.EPOCH_INDEX, config.CRC_INDEX, config.CODE_INDEX, config.PARAMETER_COUNT, config.PARAMETER_INDEX): + current_epoch_value = int(time.time()) + + epoch_value_status = utility.get_epoch_value_consistancy(current_epoch_value, actual_cloudsync_data[config.EPOCH_INDEX]) + test.verify(epoch_value_status, "epoch value should be in range and it is verified") + for index in (config.CRC_INDEX, config.CODE_INDEX, config.PARAMETER_COUNT, config.PARAMETER_INDEX): test.compare(expected_cloudsync_data[index], actual_cloudsync_data[index], "cloud sync data %s is verified" %expected_cloudsync_data[index]) test.endSection()