Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remybar committed Sep 18, 2024
1 parent 5bca80f commit ede508d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 3 deletions.
8 changes: 8 additions & 0 deletions bin/sozo/tests/test_data/policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@
"target": "0x74c73d35df54ddc53bcf34aab5e0dbb09c447e99e01f4d69535441253c9571a",
"method": "register_namespace"
},
{
"target": "0x74c73d35df54ddc53bcf34aab5e0dbb09c447e99e01f4d69535441253c9571a",
"method": "register_event"
},
{
"target": "0x74c73d35df54ddc53bcf34aab5e0dbb09c447e99e01f4d69535441253c9571a",
"method": "upgrade_event"
},
{
"target": "0x74c73d35df54ddc53bcf34aab5e0dbb09c447e99e01f4d69535441253c9571a",
"method": "deploy_contract"
Expand Down
2 changes: 1 addition & 1 deletion crates/sozo/ops/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ mod tests {
let result = extract_events(&manifest, &project_dir, &target_dir).unwrap();

// we are just collecting all events from manifest file so just verifying count should work
assert_eq!(result.len(), 20);
assert_eq!(result.len(), 22);
}

#[test]
Expand Down
10 changes: 10 additions & 0 deletions crates/sozo/ops/src/migration/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,16 @@ pub async fn print_strategy<P>(

ui.print(" ");

if !&strategy.events.is_empty() {
ui.print_header(format!("# Events ({})", &strategy.events.len()));
for e in &strategy.events {
ui.print(e.diff.tag.to_string());
ui.print_sub(format!("Class hash: {:#x}", e.diff.local_class_hash));
}
}

ui.print(" ");

if !&strategy.contracts.is_empty() {
ui.print_header(format!("# Contracts ({})", &strategy.contracts.len()));
for c in &strategy.contracts {
Expand Down
2 changes: 1 addition & 1 deletion crates/sozo/ops/src/tests/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async fn test_model_ops() {
)
.await
.unwrap(),
Felt::from_hex("0x4dd1c573b5cdc56561be8b28a4840048a3a008d1a4a6eed397ec4135effaf44")
Felt::from_hex("0x3f6ca7e8349d9ca3525132c2d45debaf5ee0c19500ef1e768eddb057ff9367e")
.unwrap()
);

Expand Down
2 changes: 1 addition & 1 deletion crates/torii/core/src/sql_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async fn test_load_from_remote() {

let _block_timestamp = 1710754478_u64;
let models = sqlx::query("SELECT * FROM models").fetch_all(&pool).await.unwrap();
assert_eq!(models.len(), 10);
assert_eq!(models.len(), 8);

let (id, name, namespace, packed_size, unpacked_size): (String, String, String, u8, u8) =
sqlx::query_as(
Expand Down
Binary file modified spawn-and-move-db.tar.gz
Binary file not shown.
Binary file modified types-test-db.tar.gz
Binary file not shown.

0 comments on commit ede508d

Please sign in to comment.