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 MutateStruct functionality #109

Open
howardjohn opened this issue Feb 19, 2023 · 2 comments
Open

Add MutateStruct functionality #109

howardjohn opened this issue Feb 19, 2023 · 2 comments

Comments

@howardjohn
Copy link

To test state transitions (for example, in a k8s controller) it's useful to mutate values rather than completely generate new structs. A brand new struct is likely too different and would mis coverage that modifying a few fields would give.

For example, we could test when a Pod IP changes or a label selector is added.

I think this could use similar logic to the existing fuzzStruct but just pick an element (struct field, map key, or array index) to mutate instead of setting all elements.

WDYT? Maybe related to istio/istio#43445

@avirtopeanu-ionos
Copy link

perhaps I don't fully grasp the desired outcome here, but why not use f.Fuzz for this? https://go.dev/security/fuzz/

@howardjohn
Copy link
Author

howardjohn commented Feb 20, 2023 via email

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

2 participants