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

Make the chewie tests only test chewie #68

Open
samrussell opened this issue Nov 12, 2018 · 1 comment
Open

Make the chewie tests only test chewie #68

samrussell opened this issue Nov 12, 2018 · 1 comment

Comments

@samrussell
Copy link
Collaborator

The current Chewie tests end up re-testing the state machine.

We should mock out any references to the state machine and test just chewie's functionality. That is, make sure it passes messages to and from the state machines correctly and responds to port status messages from faucet. It's going to be somewhat abstract, but that's the correct way to do test an object like this.

samrussell added a commit that referenced this issue Nov 14, 2018
chewie tests load up all the responses and then set the ball rolling,
but we can't rely on the radius sender to always be called before the
radius receiver.

we should implement #68 and get the mocks nice and in lock-step to test
specific sequences of events
@samrussell
Copy link
Collaborator Author

Made some progress on https://github.com/faucetsdn/chewie/tree/test_chewie_with_mocks

The main things that Chewie does is pass messages between sockets and EAP/RADIUS queues and handle packing/unpacking. The rest of the methods can be easily factored out, and it'll become a bit more clear why once this test suite is merged in.

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

No branches or pull requests

1 participant