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

initial version manager fuzz test and testing doc #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eggyhead
Copy link

@eggyhead eggyhead commented Oct 21, 2022

What are we doing?

Adding fuzz testing to the rotational versions test suite to increase coverage of edge cases.

How are we doing it?

  • Adding go-fuzz-headers library to help with using structs in our test
  • Adding tests for the versions methods note: we're only testing that any of the configs created by the fuzzer do not throw an error, we're not asserting any specific output here
  • Adding docs on how to run the tests

How do I test?

follow the instructions in the test doc 😄

Copy link
Contributor

@bbengfort bbengfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @eggyhead for continuing to push on this! I wasn't sure if you were ready for a review or not, so just wanted to check in. If you are ready for a review, I'll do a more thorough reading of the code, but everything looks great so far!

@@ -23,4 +23,4 @@ Since fuzzing involves generating inputs at time intervals, you explicitly run t
Watch the output, and view any errors that may arise. When you are satisfied the tests confirm your code working as expected, you can exit the test.

eg.
` go test -fuzz=FuzzNewVersionManager -v`
` go test -fuzz=FuzzVersionManager_Delete -v`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be a good idea to update GitHub actions with fuzzing? Alternatively, we could create a GitHub action that PRs don't depend on that performs fuzzing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Is this question about whether these tests will run automatically?

Currently, the fuzz tests will need to be run manually, as described in the doc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you!

@@ -3,11 +3,12 @@ module github.com/rotationalio/honu
go 1.16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to update this to go 1.19 for the tests to pass!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do!

@bbengfort
Copy link
Contributor

@eggyhead I'm sorry I haven't responded in a while, I wasn't sure if this was ready for review or not; things are looking great though and we're really excited to merge this PR - let me know!

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.

2 participants