test: improve logger test and search functionality

- Improve the logger test to include more specific assertions.
- Add timestamp filtering to the logger search function.
- Fix a bug in the logger search function that prevented it from correctly handling continuation lines.
- Update redisclient tests to use the correct return type.

Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
This commit is contained in:
2025-01-13 18:46:13 +02:00
parent 91f8520229
commit 81f377a532
4 changed files with 31 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ import freeflowuniverse.herolib.core.redisclient
fn setup() !&redisclient.Redis {
mut redis := redisclient.core_get()!
redis.selectdb(10) or { panic(err) }
return &redis
return redis
}
fn cleanup(mut redis redisclient.Redis) ! {

View File

@@ -8,7 +8,7 @@ fn setup() !&redisclient.Redis {
mut redis := redisclient.core_get()!
// Select db 10 to be away from default one '0'
redis.selectdb(10) or { panic(err) }
return &redis
return redis
}
fn cleanup(mut redis redisclient.Redis) ! {