teammates icon indicating copy to clipboard operation
teammates copied to clipboard

Check if the search service is active in account request search test

Open jayasting98 opened this issue 11 months ago • 16 comments

Currently, AccountRequestsDbIT::testSqlInjectionSearchAccountRequestsInWholeSystem does not check if the search service is active.

https://github.com/TEAMMATES/teammates/blob/234218979f55d3eb5689186ad737dcbdd22b3df8/src/it/java/teammates/it/storage/sqlapi/AccountRequestsDbIT.java#L196-L209

This leads to the following failing test if you try to test locally without the search service.

image

To fix this, we can check if the search service is active, before running the rest of the test, like in the following.

https://github.com/TEAMMATES/teammates/blob/234218979f55d3eb5689186ad737dcbdd22b3df8/src/it/java/teammates/it/storage/sqlsearch/AccountRequestSearchIT.java#L117-L123

jayasting98 avatar Mar 15 '24 08:03 jayasting98

Good First Issue - Notes for Contributors This issue is for first-time contributors only. If you are new to TEAMMATES, feel free to submit a PR for this issue.

Please note that we allow only one good first issue per contributor. If you have already made a prior contribution to TEAMMATES, you may wish to take a look at issues with the help wanted tag instead.

We do not assign issues to contributors. If you would like to pick up this issue, do post a comment below to express your interest and check if there is anyone else who is already working on the issue. We will do our best to reply and give you the go-ahead, but if we don't, feel free to submit a PR as long as there is no one else working on it.

To get started, do read through our contributing guidelines carefully, and set up a development environment on your local machine before making a PR.

If you need any clarifications on our developer guide, or are facing issues that are not found in our troubleshooting guide, please post a message in our discussion forum.

github-actions[bot] avatar Mar 15 '24 08:03 github-actions[bot]

We may also want to move the test method into AccountRequestSearchIT.

jayasting98 avatar Mar 15 '24 08:03 jayasting98

Hi, may I work on this issue? Besides, it seems like this issue only needs to add a check condition to ensure the search service is on and move it to the right file. Am I understanding it correctly?

Thank you

techMedMau avatar Mar 16 '24 22:03 techMedMau

can I take the issue?

traitsisgiorgos avatar Mar 17 '24 09:03 traitsisgiorgos

@techMedMau Hey Maureen, as you've previously contributed before. Let's leave this for a new contributor.

@traitsisgiorgos Feel free to submit a PR for this.

domlimm avatar Mar 17 '24 10:03 domlimm

thanks!!

traitsisgiorgos avatar Mar 17 '24 14:03 traitsisgiorgos

Hey , I am a beginner in open source having experience in java. I want to solve this issue

AggarwalNeelesh avatar Mar 23 '24 17:03 AggarwalNeelesh

@AggarwalNeelesh Hi, thank you for your interest. Let's give @traitsisgiorgos some time to try to do this. If they decide not to continue with this, you may try to tackle this issue.

jayasting98 avatar Mar 24 '24 15:03 jayasting98

Can I ask you a question ?

traitsisgiorgos avatar Apr 07 '24 10:04 traitsisgiorgos

@jayasting98

traitsisgiorgos avatar Apr 07 '24 10:04 traitsisgiorgos

We also want to move the method to the correct file?

traitsisgiorgos avatar Apr 11 '24 12:04 traitsisgiorgos

Hello, may I work on this issue?

simranfarrukh avatar Apr 11 '24 15:04 simranfarrukh

We also want to move the method to the correct file?

Hi @traitsisgiorgos, yes, we may want to move it over to AccountRequestSearchIT.

jayasting98 avatar Apr 12 '24 07:04 jayasting98

Hey, @simranfarrukh, thank you for your interest. @traitsisgiorgos is working on this right now. If you want, you can consider handling a different issue.

jayasting98 avatar Apr 12 '24 07:04 jayasting98

Is this issue still available to be worked on? I would like to work on it with my team for a class project!

EmilyMSong avatar Apr 28 '24 01:04 EmilyMSong

Hello, @EmilyMSong. @traitsisgiorgos is currently working on this right now. Nevertheless, if you would still like to contribute, there are other issues that you can consider working on.

jayasting98 avatar May 07 '24 14:05 jayasting98

Hi, @jayasting98. I am looking to work on this project and I am trying to get AccountRequestsDbIT::testSqlInjectionSearchAccountsRequestsInWholeSystem to pass.

I have made the changes locally, and it seems that #13101 also remedies this issue, but has not been merged in.

Would it be possible to work on this issue? Thanks!