From fad317349557bee1055d81d7444f99619247815c Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 5 Oct 2021 19:06:01 +0200 Subject: Fs asserts and Create action tests. --- cli/src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cli/src/main.rs') diff --git a/cli/src/main.rs b/cli/src/main.rs index d140d97..6504366 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,4 +1,4 @@ -use std::env; +use std::{env, time::SystemTime}; use ka::{ actions::{create, shift, update, ActionOptions}, @@ -14,12 +14,17 @@ fn main() { let filesystem = FsImpl {}; + let timestamp = SystemTime::now() + .duration_since(SystemTime::UNIX_EPOCH) + .expect("Could not get current system time.") + .as_secs(); + match command { "create" => { - create(options, &filesystem).expect("Failed executing Create action."); + create(options, &filesystem, timestamp).expect("Failed executing Create action."); } "update" => { - update(options, &filesystem).expect("Failed executing Update action."); + update(options, &filesystem, timestamp).expect("Failed executing Update action."); } "shift" => { let new_cursor: usize = args[2].as_str().parse().expect("Invalid cursor."); -- cgit 1.4.1