-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(CI): Update test baselines in iota-adapter-transactional-tests
#957
Conversation
crates/iota-adapter-transactional-tests/tests/deny_list/coin_deny_and_undeny.exp
Outdated
Show resolved
Hide resolved
@@ -16,7 +16,7 @@ module A0::m { | |||
} | |||
} | |||
|
|||
//# upgrade --package A0 --upgrade-capability 1,2 --sender A | |||
//# upgrade --package A0 --upgrade-capability 1,1 --sender A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than just line changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and a few others with some number changes only are probably related to due to objects being reordered in the test storage map
you mentioned, can you also tell why they are reordered now? Also where is this map defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume they are reordered due to the packages/addresses changing but I am not 100% sure. However, they are clearly reordered, which you can see from the output. Whenever read-object
is called in the script it outputs the object stored at those indexes (which I believe are package_index,index_within_package
) and despite not changing the commands, many of these are in a new ordering. I can do a deeper dive into the specific reason they are reordered if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the fn that determines the ordering.
// stable way of sorting objects by type. Does not however, produce a stable
// sorting between objects of the same type
fn get_object_sorting_key(&self, id: &ObjectID) -> String {
match &self.get_object(id, None).unwrap().data {
object::Data::Move(obj) => self.stabilize_str(format!("{}", obj.type_())),
object::Data::Package(pkg) => pkg
.serialized_module_map()
.keys()
.map(|s| s.as_str())
.collect::<Vec<_>>()
.join(","),
}
}
Before, the type names of some packages started with "s" and now they start with "i", which I assume caused those to be reordered above some of the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, thanks for investigating, maybe also put it in the PR description
Btw what command did you run for these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran UB=1 cargo nextest run -p iota-adapter-transactional-tests
(usually with the test name specified) in order to update the .exp
whenever I made a change to the .move
file. For simtests just replace cargo nextest run
with scripts/simtest/cargo-simtest simtest
.
But there was not an easy way to update the .move
files, I had to manually inspect the output and determine what changed and how to update appropriately. It sucked.
And I think we can just leave this comment thread open for other folks to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't really have an easy way to verify if these numbers are correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. I know the values are correct because the fundamental test case outlined in the .exp
is unchanged, but that is not easy to check.
...ta-adapter-transactional-tests/tests/receive_object/shared_parent/receive_dof_and_mutate.exp
Show resolved
Hide resolved
...a-adapter-transactional-tests/tests/receive_object/shared_parent/receive_dof_and_mutate.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/deny_list/coin_deny_and_undeny.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/deny_list/coin_deny_and_undeny.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/deny_list/coin_deny_tto.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/deny_list/coin_deny_tto.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/dynamic_fields/add_duplicate_object.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/dynamic_fields/borrow_wrong_type_object.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/dynamic_fields/remove_wrong_type_object.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/mvcc/middle_version_less_than_child.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_df.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.exp
Show resolved
Hide resolved
...es/iota-adapter-transactional-tests/tests/mvcc/receive_object_access_through_parent_dof.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_dof.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/mvcc/receive_object_dof.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/programmable/split_coins.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/upgrade.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/duplicate_receive_argument.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_add_dof_and_mutate.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_add_dof_and_mutate.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_dof_and_mutate.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_duo_struct.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_duo_struct.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/receive_object/receive_invalid_param_ty.exp
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/init/entry_old.mvir
Outdated
Show resolved
Hide resolved
crates/iota-graphql-e2e-tests/tests/available_range/available_range.move
Show resolved
Hide resolved
crates/iota-adapter-transactional-tests/tests/programmable_transaction_examples/publish.move
Show resolved
Hide resolved
…957) * update iota-adapter-transaction-test baselines * Replace protocol version in init commands and update more baselines * Revert accidental included change * ignore a test in `iota-replay` * Fix some broken move tests and remove unnecesssary ones from past protocol versions * Revert change in other crate --------- Co-authored-by: Thibault Martinez <[email protected]>
Description of change
Updates the baseline tests data for this crate, and replaces the protocol version in the init commands. For context, the line numbers in these files changed due to the added copyright line at the top of each file.
Some of the
.move
files had to be changed additionally, due to objects being reordered in the test storage map. These objects are referred to by index, and some of those changed. However, this should not fundamentally change the test.Links to any relevant issues
#806