-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add tests to ensure session is set correctly in OnChainScrapingVotes
#4821
Conversation
OnChainScrapingVotes
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.
A indirect test, but it covers it
I don't think it covers it. I've checked it before, it passed on master before #4810, because it triggers only else branch here polkadot/runtime/parachains/src/paras_inherent/mod.rs Lines 180 to 189 in 594e3b9
|
Just stepped through with a debugger, @ordian is correct. I am working on a separate test case atm |
d76a5bd
to
3034ff6
Compare
8925da0
to
86ff7fd
Compare
@@ -1313,6 +1313,10 @@ fn check_signature( | |||
} | |||
} | |||
|
|||
#[cfg(test)] | |||
#[allow(unused_imports)] |
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.
why is it needed? isn't it used when cfg(test) is enabled?
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 saw an error in CI about unused imports, hence I added it. This will be refactored soon after #4834 since there is quite a bit of duplicate test code.
Add assertions to runtime tests in order to ensure that session in
OnChainScrapingVotes
matches the expected session.Addition to #4810