Add time method #111

Merged
d.zayakin merged 1 commit from d.zayakin/frostfs-testlib:add-time-method into master 2023-11-02 08:43:20 +00:00
Member

Signed-off-by: Dmitriy Zayakin d.zayakin@yadro.com

Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
d.zayakin requested review from qa-committers 2023-11-01 08:12:10 +00:00
anikeev-yadro approved these changes 2023-11-01 09:04:16 +00:00
d.zayakin force-pushed add-time-method from 32b7b895ab to 601a37b694 2023-11-01 09:14:06 +00:00 Compare
abereziny approved these changes 2023-11-01 09:15:57 +00:00
abereziny reviewed 2023-11-01 09:22:49 +00:00
@ -391,0 +407,4 @@
):
assert (self.get_node_time(node) - in_date) < datetime.timedelta(minutes=1)
@reporter.step_deco(f"Restore time to now")
Member

Restore time

`Restore time`
abereziny reviewed 2023-11-01 09:23:10 +00:00
@ -391,0 +396,4 @@
shell.exec("hwclock").stdout.strip(), "%Y-%m-%d %H:%M:%S.%f%z"
)
@reporter.step_deco("Change the time on the node to {in_date}")
Member

Set node time to ...

`Set node time to ...`
abereziny reviewed 2023-11-01 09:24:44 +00:00
@ -391,0 +403,4 @@
shell.exec("hwclock --hctosys")
node_time = self.get_node_time(node)
with reporter.step(
f"We check that the difference between {node_time} and {in_date} is no more than a minute"
Member

Verify difference between ... is less than a minute and we can fit 120 chars on line :)

`Verify difference between ... is less than a minute` and we can fit 120 chars on line :)
abereziny reviewed 2023-11-01 09:26:05 +00:00
@ -391,0 +397,4 @@
)
@reporter.step_deco("Change the time on the node to {in_date}")
def change_node_time(self, node: ClusterNode, in_date: datetime) -> None:
Member

also, maybe rename to date instead of time )

set node date , get node date ..etc

also, maybe rename to `date` instead of `time` ) `set node date` , `get node date` ..etc
d.zayakin force-pushed add-time-method from 601a37b694 to 37a6d05b9b 2023-11-02 07:52:58 +00:00 Compare
d.zayakin requested review from anikeev-yadro 2023-11-02 07:53:19 +00:00
d.zayakin requested review from abereziny 2023-11-02 07:53:20 +00:00
anikeev-yadro approved these changes 2023-11-02 07:58:07 +00:00
abereziny reviewed 2023-11-02 08:02:51 +00:00
abereziny approved these changes 2023-11-02 08:04:25 +00:00
d.zayakin force-pushed add-time-method from 37a6d05b9b to 1f50166e78 2023-11-02 08:13:46 +00:00 Compare
abereziny approved these changes 2023-11-02 08:15:58 +00:00
anikeev-yadro approved these changes 2023-11-02 08:33:50 +00:00
d.zayakin merged commit 1f50166e78 into master 2023-11-02 08:43:19 +00:00
d.zayakin deleted branch add-time-method 2023-11-02 08:43:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-testlib#111
No description provided.