irods / irods_client_globus_connector

The iRODS Globus Connector
2 stars 4 forks source link

Issue 82 automated testing #89

Closed JustinKyleJames closed 2 months ago

JustinKyleJames commented 2 months ago

This is a first pass at automated testing for the Globus plugin.

Some notes:

  1. Right now this only works against an Ubuntu20 installation of Globus. The test cases should run fine against others as long as the servers are set up properly. I have docker scripts that will set up other OS's so for now I will run the tests manually within those containers.

  2. At the moment I have to use a lot of telnet and ftp in the tests. Some of it is intended and some is a byproduct of its use elsewhere. This is due to the following:

    • Some things can't be done in globus-url-copy.
    • I am not sure how to set it up the certificates so that globus-url-copy can be run against the non-privileged user user1 without modifying a configuration file and restarting the server, so all tests against that user must use telnet/ftp.
    • I only know how to use telnet/ftp with the anonymous ftp user which is defined in the configuration as user1.
    • Right now the testing framework doesn't allow me to run icommands as other users (as it allows in the core irods tests).
    • Because of all of these, if I am testing something that requires telnet/ftp or I desire to test against a non-privileged user, I must use telnet/ftp to perform all actions even setup and cleanup actions.

I can solve these limitations in the future.

  1. The tests/libs were simply copied from irods_client_s3_api with some S3 stuff removed.
JustinKyleJames commented 2 months ago

In addition to handling issues from above, I changed the checksum markers code to handle it if we got more than one marker. This test now also handles the situation where we hang looking for a marker if the checksum comes back too fast. In the latter case, we would still generate an error because we didn't see a marker but it wouldn't hang.

JustinKyleJames commented 2 months ago

very cool. what's the status? it all runs and passes and gives us confidence?

Yes it runs and passes. I believe it covers most of what I test.

Some things missing:

trel commented 2 months ago

Consider making an issue for each known missing test (category).

JustinKyleJames commented 2 months ago

Consider making an issue for each known missing test (category).

I created the issues.

trel commented 2 months ago

depends on https://github.com/irods/irods_client_globus_connector/pull/87 - merge that one first

JustinKyleJames commented 2 months ago

Note that this PR right now is dependent on #87 but only because there are a couple of test cases for the fix for #87. However, I could reorganize the two to remove those two test cases and move them into the PR for #87. Otherwise I will just rebase this after that one is merged.

trel commented 2 months ago

rebase seems fine - just keep the linking good and should be fine.

korydraughn commented 2 months ago

Is this ready?

alanking commented 2 months ago

87 has been merged. Please rebase once more.

JustinKyleJames commented 2 months ago

87 has been merged. Please rebase once more.

Done

korydraughn commented 2 months ago

Missing issue number for commit Adding Ubuntu20 tests?

trel commented 2 months ago

might just get squashed...

JustinKyleJames commented 2 months ago

Missing issue number for commit Adding Ubuntu20 tests?

Yes, that along with many others were intended to be squashed.

JustinKyleJames commented 2 months ago

Let's # it.

Done