Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
What types of changes does your code introduce to Litmus? Put an x in the boxes that apply
[ ] New feature (non-breaking change which adds functionality)
[x] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices applies)
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
[x] I have signed the commit for DCO to be passed.
[x] Lint and unit tests pass locally with my changes
[x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[x] I have added necessary documentation (if appropriate)
Dependency
Please add the links to the dependent PR need to be merged before this (if any).
Special notes for your reviewer:
I need feedback on the approach of passing probeOperator as a parameter to functions.
For example, the function GenerateExperimentManifestWithProbes in chaoscenter/graphql/server/pkg/probe/utils/utils.go directly accesses probe operation. I have added the probeOperator dependency to the handler that uses GenerateExperimentManifestWithProbes and updated the function calls to pass probeOperator as a parameter.
Proposed changes
This PR adds operator interface to probe pkg
4836, I tried to add fuzz test for probe handler.
However, the current architecture made it impossible to mock probe operations, so I added probe operator interface.
This picture is about probe pkg.
References
4159
Types of changes
What types of changes does your code introduce to Litmus? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Dependency
Special notes for your reviewer:
I need feedback on the approach of passing
probeOperator
as a parameter to functions.For example, the function
GenerateExperimentManifestWithProbes
in chaoscenter/graphql/server/pkg/probe/utils/utils.go directly accesses probe operation. I have added theprobeOperator
dependency to the handler that usesGenerateExperimentManifestWithProbes
and updated the function calls to passprobeOperator
as a parameter.