Skip to content

Commit

Permalink
fix: fixing macos ci by redacting the vm_kind (#10057)
Browse files Browse the repository at this point in the history
the insta snapshots tests work by generating snapshot files containing
some configuration
sadly that configuration contains the architecture depended field
vm_kind - it's different on macos and linux
this PR disables those tests selectively on macos in order to fix the ci
  • Loading branch information
wacban authored Nov 1, 2023
2 parents 4868bd6 + f86047f commit ff4c7c9
Show file tree
Hide file tree
Showing 39 changed files with 96 additions and 42 deletions.
56 changes: 54 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ bitflags = "1.2"
blake2 = "0.9.1"
bn = { package = "zeropool-bn", version = "0.5.11" }
# TODO: revert to upstream bolero once https://github.com/camshaft/bolero/pull/186 lands and gets released
bolero = { version = "0.9.0", git = "https://github.com/camshaft/bolero", rev = "7d955a67fbd06f61ffaf28178e976280c33c045a", features = ["arbitrary"] }
bolero = { version = "0.9.0", git = "https://github.com/camshaft/bolero", rev = "7d955a67fbd06f61ffaf28178e976280c33c045a", features = [
"arbitrary",
] }
borsh = { version = "1.0.0", features = ["derive", "rc"] }
bs58 = "0.4"
bytes = "1"
Expand Down Expand Up @@ -159,7 +161,7 @@ hyper-tls = "0.5.0"
im = "15"
indexmap = "1.6"
indicatif = { version = "0.15.0", features = ["with_rayon"] }
insta = { version = "1.26.0", features = ["json", "yaml"] }
insta = { version = "1.34.0", features = ["json", "yaml", "redactions"] }
integration-tests = { path = "integration-tests" }
itertools = "0.10.0"
itoa = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions core/primitives/src/runtime/config_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ mod tests {
let snapshot_name = format!("{version}.json");
let config_view = RuntimeConfigView::from(store.get_config(*version).as_ref().clone());
any_failure |= std::panic::catch_unwind(|| {
insta::assert_json_snapshot!(snapshot_name, config_view);
insta::assert_json_snapshot!(snapshot_name, config_view, { ".wasm_config.vm_kind" => "<REDACTED>"});
})
.is_err();
}
Expand Down Expand Up @@ -360,7 +360,7 @@ mod tests {
let snapshot_name = format!("testnet_{version}.json");
let config_view = RuntimeConfigView::from(store.get_config(*version).as_ref().clone());
any_failure |= std::panic::catch_unwind(|| {
insta::assert_json_snapshot!(snapshot_name, config_view);
insta::assert_json_snapshot!(snapshot_name, config_view, { ".wasm_config.vm_kind" => "<REDACTED>"});
})
.is_err();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "NearVm",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 2207874,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "NearVm",
"vm_kind": "<REDACTED>",
"disable_9393_fix": true,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "NearVm",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "NearVm",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "NearVm",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 3856371,
"vm_kind": "Wasmer0",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 2207874,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "Trie",
"fix_contract_loading_cost": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ expression: config_view
},
"grow_mem_cost": 1,
"regular_op_cost": 822756,
"vm_kind": "Wasmer2",
"vm_kind": "<REDACTED>",
"disable_9393_fix": false,
"storage_get_mode": "FlatStorage",
"fix_contract_loading_cost": false,
Expand Down
Loading

0 comments on commit ff4c7c9

Please sign in to comment.