tests(evm::engine): basic policies tests

This commit is contained in:
hdbg
2026-03-11 13:57:25 +01:00
parent bd159c35e8
commit 9e92b168ba
8 changed files with 846 additions and 47 deletions

View File

@@ -56,7 +56,7 @@ pub mod types {
fn from_sql(
mut bytes: <Sqlite as diesel::backend::Backend>::RawValue<'_>,
) -> diesel::deserialize::Result<Self> {
let Some(SqliteType::Integer) = bytes.value_type() else {
let Some(SqliteType::Long) = bytes.value_type() else {
return Err(format!(
"Expected Integer type for SqliteTimestamp, got {:?}",
bytes.value_type()
@@ -64,8 +64,8 @@ pub mod types {
.into());
};
let unix_timestamp = bytes.read_integer();
let datetime = DateTime::from_timestamp(unix_timestamp as i64, 0)
let unix_timestamp = bytes.read_long();
let datetime = DateTime::from_timestamp(unix_timestamp, 0)
.ok_or("Timestamp is out of bounds")?;
Ok(SqliteTimestamp(datetime))