-
Notifications
You must be signed in to change notification settings - Fork 2
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
Revive tests #384
Revive tests #384
Conversation
…into 253-revive-tests-1
…itionally added a test
2cbb29f
to
265579e
Compare
265579e
to
8f7bd24
Compare
3bf7212
to
e891593
Compare
e891593
to
2d77dcc
Compare
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.
Pretty cool!
I have some minor remarks here and there but otherwise the tests work. I'm not sure why they are so slow though? You don't seem to use time-controlling operations here, or did I miss something?
You also don't test deposits that much. Did you just choose to postpone this to another PR or is something blocking else blocking?
let add_swap_pair_should_fail_if_user_is_non_admin = | ||
Breath.Model.case | ||
"test add swap pair" | ||
"should be fail if user is non admin" |
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.
"should be fail if user is non admin" | |
"should fail if user is non admin" |
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 was surprised by this but you're the native speaker after all (and you use this form in several places as well). You do use "should fail" in lots of places though, so I'm not sure if it's a typo or not.
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.
Copy and paste laziness! Will fix
batcher/test/common/expect.mligo
Outdated
(* | ||
This function is ported from the breathlyser library due to it not being in the packeged version. Once the method is available in the package, the method can be replaced. | ||
*) | ||
|
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 think it's ok now
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 will switch it out
let originate_module | ||
(type a b) | ||
(level: level) | ||
(name: string) | ||
(contract: (a, b) module_contract) | ||
(storage: b) | ||
(quantity: tez) : (a, b) originated = | ||
let typed_address, _, _ = Test.originate_module contract storage quantity in | ||
let contract = Test.to_contract typed_address in | ||
let address = Tezos.address contract in | ||
|
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 don't think you need this anymore
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.
Thanks, will remove
let ntol = TestUtils.tolerance_to_nat tolerance in | ||
{ | ||
swap = swap; | ||
created_at = Tezos.get_now (); |
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'm not sure you should use get_now
when you create orders, as it can be sensitive to the execution context of the test. Maybe just forge timestamps and pass them around as argument?
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.
None of the tests really rely on it so it is just an easy timestamp generator.
This was the test that was originally blocked by getting the oracle price. I am working on them now, plus some redemption tests. Regarding the slowness. Are you using "make test" ? |
No description provided.