Skip to content
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

Add unit tests to noise #315

Merged
merged 2 commits into from
Sep 6, 2022
Merged

Add unit tests to noise #315

merged 2 commits into from
Sep 6, 2022

Conversation

schultetwin1
Copy link
Contributor

Introduces some basic encapsulate/decapsulate tests for the noise mod

@Noah-Kennedy
Copy link
Collaborator

You have displeased rustfmt

@Noah-Kennedy
Copy link
Collaborator

This is good to merge as soon as you fix rustfmt.

boringtun/src/noise/timers.rs Outdated Show resolved Hide resolved
boringtun/src/noise/timers.rs Outdated Show resolved Hide resolved
@schultetwin1
Copy link
Contributor Author

This is good to merge as soon as you fix rustfmt.

Fixed!

@Noah-Kennedy
Copy link
Collaborator

@schultetwin1 try pushing an empty commit, the integration tests are failing. I'm hoping this is spurious.

@schultetwin1
Copy link
Contributor Author

@schultetwin1 try pushing an empty commit, the integration tests are failing. I'm hoping this is spurious.

I'm looking into it. I'm wondering if it's not spurious. I did introduce the mocking on Instant which could mean time is not increasing.

@Noah-Kennedy
Copy link
Collaborator

Yeah that might be doing it.

@Noah-Kennedy
Copy link
Collaborator

@schultetwin1 you might want to move that out of #[cfg(test)] and into some special test CI path, behind a rustc --cfg flag. This would allow us to do this without any users being able to accidentally opt into this by enabling features.

@schultetwin1
Copy link
Contributor Author

@schultetwin1 you might want to move that out of #[cfg(test)] and into some special test CI path, behind a rustc --cfg flag. This would allow us to do this without any users being able to accidentally opt into this by enabling features.

Good idea, done! I'm pretty sure the tests will now run since we have cargo hack test --each-feature

@schultetwin1 schultetwin1 merged commit 370a9ed into master Sep 6, 2022
@schultetwin1 schultetwin1 deleted the add_noise_unit_tests branch September 6, 2022 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants