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

chore: remove global variable for better unit testing #4217

Open
namkyu1999 opened this issue Oct 5, 2023 · 10 comments · May be fixed by #4997
Open

chore: remove global variable for better unit testing #4217

namkyu1999 opened this issue Oct 5, 2023 · 10 comments · May be fixed by #4997

Comments

@namkyu1999
Copy link
Member

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.

Operator MongoOperator = &MongoOperations{}

We need to find and change all the places where that global variable is used, like this
Screenshot 2023-10-05 at 11 37 03 AM

Here's an example of what we did first #4136

Anyone who finds good first issues or participates in hacktoberfest can take this issue.

@Ratul-Saha-003
Copy link

I would like to work on this. Could you assign this to me?

@Ratul-Saha-003
Copy link

Kindly review(PR added): #4219

@UncleWeeds
Copy link

Can I work on this

@srikanth-iyengar
Copy link

srikanth-iyengar commented Nov 11, 2023

Hey @namkyu1999 is this still open?
Looks like some of the required changes are already done

@srikanth-iyengar
Copy link

Do we have to eliminate global variables usage like the following?
image

@prashantrewar
Copy link

Hey @namkyu1999 , I would like to work on this issue. Is this issue still up for grabs?

@namkyu1999
Copy link
Member Author

Hey @namkyu1999 , I would like to work on this issue. Is this issue still up for grabs?

sure, go ahead!

@prashantrewar
Copy link

/assign

@prashantrewar
Copy link

@namkyu1999, I am new to the litmus project, Could you please guide me on this issue?

@pred695
Copy link

pred695 commented May 30, 2024

hey can you please assign me this issue? @S-ayanide @namkyu1999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment