litmus
litmus copied to clipboard
chore: remove global variable for better unit testing
In Litmus version 2, we already remove global variables. you can see here #3937
However, with the change of Litmus version to 3, we have a new global variable, which we need to change to a field in the struct because global variables make unit testing difficult.
Here's a global variable what we need to remove. https://github.com/litmuschaos/litmus/blob/794676f6b75e08835334fd5d675e0b0d096d5f9d/chaoscenter/graphql/server/pkg/database/mongodb/operations.go#L36
We need to find and change all the places where that global variable is used, like this
Here's an example of what we did first #4136
Anyone who finds good first issues or participates in hacktoberfest can take this issue.
I would like to work on this. Could you assign this to me?
Kindly review(PR added): https://github.com/litmuschaos/litmus/pull/4219
Can I work on this
Hey @namkyu1999 is this still open? Looks like some of the required changes are already done
Do we have to eliminate global variables usage like the following?
Hey @namkyu1999 , I would like to work on this issue. Is this issue still up for grabs?
Hey @namkyu1999 , I would like to work on this issue. Is this issue still up for grabs?
sure, go ahead!
/assign
@namkyu1999, I am new to the litmus project, Could you please guide me on this issue?
hey can you please assign me this issue? @S-ayanide @namkyu1999