Skip to content

Commit

Permalink
fix(tests): fix uuids in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rivnakm committed Jun 3, 2023
1 parent 10ebf04 commit afb1339
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ mod tests {

let cache = Cache::new(filename).unwrap();

let key = Uuid::new_v5(&Uuid::NAMESPACE_OID, "uuid".as_bytes());
let key = Uuid::new_v4();
let value = String::from("Hello, world!");

cache.store(&key, value.clone()).unwrap();
Expand All @@ -233,7 +233,7 @@ mod tests {

let cache = Cache::new(filename).unwrap();

let key = Uuid::new_v5(&Uuid::NAMESPACE_OID, "uuid".as_bytes());
let key = Uuid::new_v4();
let value = String::from("Hello, world!");

cache.store(&key, value).unwrap();
Expand All @@ -255,7 +255,7 @@ mod tests {

let cache = Cache::new(filename.clone()).unwrap();

let key = Uuid::new_v5(&Uuid::NAMESPACE_OID, "uuid".as_bytes());
let key = Uuid::new_v4();
let value = String::from("Hello, world!");

store_manual(filename, &key, value, Utc::now() - Duration::minutes(5)).unwrap();
Expand All @@ -274,7 +274,7 @@ mod tests {

let cache = Cache::new(filename).unwrap();

let key = Uuid::new_v5(&Uuid::NAMESPACE_OID, "uuid".as_bytes());
let key = Uuid::new_v4();

let result: Option<String> = cache.get(&key).unwrap();

Expand All @@ -298,7 +298,7 @@ mod tests {

let cache = Cache::with_time_to_live(filename.clone(), Duration::minutes(5)).unwrap();

let key = Uuid::new_v5(&Uuid::NAMESPACE_OID, "uuid".as_bytes());
let key = Uuid::new_v4();
let value = String::from("Hello, world!");

store_manual(
Expand Down Expand Up @@ -331,7 +331,7 @@ mod tests {

let cache = Cache::with_time_to_live(filename.clone(), Duration::minutes(5)).unwrap();

let key = Uuid::new_v5(&Uuid::NAMESPACE_OID, "uuid".as_bytes());
let key = Uuid::new_v4();
let value = String::from("Hello, world!");

store_manual(
Expand Down

0 comments on commit afb1339

Please sign in to comment.