-
Notifications
You must be signed in to change notification settings - Fork 20
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
Test security module against actual indentity. #30
Conversation
src/security_module/mod.rs
Outdated
@@ -76,25 +76,15 @@ mod tests { | |||
} | |||
})).unwrap().public_key; | |||
|
|||
let rsender = requests_sender.clone(); |
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.
@A4Vision : The purpose of this test was to make sure that RequestPublicKey returns a consistent result from the security module (Even when called twice). I propose one of the following:
- Add the comparison of
actual_public_key
againstpublic_key1
- Leave this test as it is, and add a new test that compares
actual_public_key
andpublic_key_from_client
.
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.
Good eye ! I see - I did weaken the test, so I fix it to solution 1.
In this case, a "for" loop is simpler than previous code - so I add a for loop.
@A4Vision : The tests in this module were meant to check the interface of SecurityModule. Indeed we can make the tests shorter if we use the internal I think that the tests should only deal with the interface of SecurityModule. If we call methods of identity directly we mix the two interfaces. What is your opinion? |
Use a for loop.
@realcr : Generally I agree that separating testing of interfaces is better when reasonable. In the second test ( |
@A4Vision : I restarted the travis job, because it seemed to fail on the famous timer test. Hopefully it will pass this time. Regarding the second test: I propose that you add another test with the code the you like (Directly calling |
Done. Discussing it any further simply does not worth our time. |
….com/realcr/cswitch into assaf/fix/security-module-correct-test
Upstream problem with rust compiler + clippy, reported here: |
I will submit a PR to freeze the rust version in CI.
real <notifications@github.com>於 2018年3月18日 週日,上午6:18寫道:
… Upstream problem with rust compiler + clippy, reported here:
rust-lang/rust#49114 <rust-lang/rust#49114>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AO0XaYzFk_Bo81IRzg-OsHeflGfTZoILks5tfYvGgaJpZM4SlsQi>
.
|
Simplify the tests, compare client usage against direct usage of Identity.