opal icon indicating copy to clipboard operation
opal copied to clipboard

More tests wanted

Open asafc opened this issue 3 years ago • 12 comments

OPAL is pretty well tested (we have over 40 tests) but more tests is always better. :)

If someone wants to contribute more tests, please reach out and we will be happy to guide you :)

asafc avatar Apr 14 '21 21:04 asafc

Hiii @asafc! I would love to get involved in the project and contribute to tests. Do let me know how I can get started? Very excited to do it!

valkyr13 avatar Jan 22 '23 14:01 valkyr13

Hi @valkyr13

Sorry for the late reply, maybe try to start with api testing of the scopes api? https://github.com/permitio/opal/blob/master/packages/opal-server/opal_server/scopes/api.py

@orishavit can guide you.

The stuff you need to know:

asafc avatar Jan 30 '23 12:01 asafc

Hi @asafc I would like to get involved in the project. as you have mentioned above the stuff needed for the testing I am going through them can you please tell me how can i get in touch with @orishavit for guidance

nakulbh avatar Jan 31 '23 13:01 nakulbh

Hi @nakulbh :) thanks for getting involved! you can reach me at [email protected]

orishavit avatar Jan 31 '23 13:01 orishavit

HI @orishavit @asafc Sorry about the late reply I can get started on the issue right away Is there a threshold of coverage expected for unit tests?

valkyr13 avatar Feb 05 '23 15:02 valkyr13

Hi @valkyr13 - sorry for missing your reply; -at this point coverage percentage is not critical - it is more important to have basic tests that a re missing first.

I think the scopes test @asafc suggests above is a good place to start; And maybe even simpler tests of the OPAL server / OPAL client starting with different configs

orweis avatar Feb 07 '23 22:02 orweis

Hey @valkyr13 - as was said above, coverage is less important. I think the single most helpful test we can add would be some kind of end-to-end test script. Meaning, launching OPAL Server with scopes, adding a scope, launching an OPAL client with that scope, checking that the client got the correct policy and date, making a change to the policy and seeing that the client is updated, an so on. It's kind of a big one, but doesn't require as much of an in depth understanding of OPAL internals.

If this sounds like something you're interested in doing, I can expand on it and get you started.

Thank you! 💟

orishavit avatar Feb 09 '23 14:02 orishavit

Hi Ori

I am interested to take the task up. Please do expand Any extra resources you would suggest for me to get started. I will go through it and reach out to you if I have any questions

Thanks and Regards

On Thu, 9 Feb, 2023, 8:28 pm Ori Shavit, @.***> wrote:

Hey @valkyr13 https://github.com/valkyr13 - as was said above, coverage is less important. I think the single most helpful test we can add would be some kind of end-to-end test script. Meaning, launching OPAL Server with scopes, adding a scope, launching an OPAL client with that scope, checking that the client got the correct policy and date, making a change to the policy and seeing that the client is updated, an so on. It's kind of a big one, but doesn't require as much of an in depth understanding of OPAL internals.

If this sounds like something you're interested in doing, I can expand on it and get you started.

Thank you! 💟

— Reply to this email directly, view it on GitHub https://github.com/permitio/opal/issues/47#issuecomment-1424322423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE66QCIVBHCODAPQCNNJM3LWWUAX7ANCNFSM426E4TPA . You are receiving this because you were mentioned.Message ID: @.***>

valkyr13 avatar Feb 11 '23 04:02 valkyr13

You can use one of the docker-compose examples (under the docker/ dir) as a starting point. Running a docker-compose stack and writing tests against it would be the easiest way to start this.

orishavit avatar Feb 13 '23 16:02 orishavit

hi @orishavit I have few basic questions since i am getting started, i need to know Here's my understanding I would deploy the the opal server, client using docker compose files and add a script to hit APIs modify scopes my query is-> In the PR, i need to add a bash script or python script in the docker directory ?

Just want to know i am on the right course( currently looking into second part of test requirement i.e changing policy in client)

valkyr13 avatar Feb 19 '23 14:02 valkyr13

HI @valkyr13 ideally you'd add the tests to run as part of the pytest suite you can see existing tests here:

  • https://github.com/permitio/opal/tree/master/packages/opal-client/opal_client/tests
  • https://github.com/permitio/opal/tree/master/packages/opal-server/opal_server/tests

orweis avatar Feb 20 '23 09:02 orweis

Hey! Can I work on this issue??

Vishrut19 avatar May 19 '23 12:05 Vishrut19