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

Add omero-test-infra to Travis #27

Merged
merged 5 commits into from
Sep 20, 2018
Merged

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Dec 6, 2017

See ome/omero-test-infra#1 and related downstream PRs

This PR adds the omero-test-infra framework to minimal-omero-client very similarly to what was done in ome/rOMERO-gateway#22, using .omero/lib-docker as the entrypoint for tests. A minimal Dockerfile builds the client using gradle and sets the binary as the RUN command.

Open for review and feedback at this stage, there might be various improvements we want to consider before merging.

In terms of infrastructure impact, I would expect this should suffice to drop OMERO-DEV-merge-maven-client.

@dominikl
Copy link
Member

dominikl commented Dec 6, 2017

If I try to run locally what is specified in the .travis.yml I get

+ docker cp -L . omero_omero_1://minimal-omero-client
flag provided but not defined: -L
See 'docker cp --help'.

Is that expected? Sorry, I still don't fully understand how https://github.com/openmicroscopy/omero-test-infra works...

With respect to testing the minimal-omero-client:
I think the main purpose of minimal-omero-client is to provide a proper pom.xml which points to the correct versions, dependencies, etc. So I guess being able to establish a simple connection to a test server is a sufficient test for this.
Alternatively, if we want the minimal-omero-client to be a proper example for an omero client, we could migrate the java training examples from https://github.com/openmicroscopy/openmicroscopy/tree/develop/examples/Training/java/src/training into here?

With respect to the general omero-test-infra framework:
I can't see any common tests or test data setup which could be integrated into the framework itself. I guess it's very specific to the repository which makes use of it. I wonder if something like https://github.com/ome/rOMERO-gateway/blob/master/.omeroci/test-data could be generalized and added to the omero-test-infra (or is it already!?), i.e. a script to fill the test server with data which is always run after the docker setup; by default it doesn't do anything, but in the repositories which make use of omero-test-infra it can be customized. Maybe that is already the case, don't quite understand yet how/where the test-data script is launched in the romero-gateway case.
Similar for https://github.com/ome/rOMERO-gateway/blob/master/tests/runtest , a script which runs the tests, which runs after the test-data script, again by default shouldn't do anything, but can be customized by "client" repositories.

@joshmoore
Copy link
Member

flag provided but not defined: -L

What docker version?

I guess being able to establish a simple connection to a test server is a sufficient test for this.

👍

(or is it already!?),

No. My thinking initially was that each repo would want something different, but if that needs unifying into omero-test-infra that's fine.

don't quite understand yet how/where the test-data script is launched

In this case, lib-docker. The idea behind .omeroci which doesn't have a README yet unfortunately, is to be a location where we put things with well-known names, i.e. a repository-api so a repo can say, "to test data run X" Well-known names include:

  • bump-version - what it says on the tin
  • test-data - create the data that the integration tests in this repository expect
  • app-config - configure this plugin for OMERO.web

@dominikl
Copy link
Member

dominikl commented Dec 6, 2017

Yes, was a docker issue, had an old version in /usr/local/bin.
Ah, the test-data script is launched from lib-docker, thanks. I thinks that's missing then in this PR, the test-data script which executes the SimpleConnection example, otherwise the example is not run by the travis build.

@joshmoore
Copy link
Member

+'[' -e .omeroci/test-data ']'
+docker run --link omero_omero_1:omero --net omero_default --rm test
Connected as root

i.e. works without test-data?

@sbesson
Copy link
Member Author

sbesson commented Dec 7, 2017

Thanks both, will review this branch and push some extra commits when I can. A few answers

Alternatively, if we want the minimal-omero-client to be a proper example for an omero client, we could migrate the java training examples from https://github.com/openmicroscopy/openmicroscopy/tree/develop/examples/Training/java/src/training into here?

My feeling here is that this goes against the minimal aspect of this repo. That being said, I could see us migrating the training examples to their own repo independently and consuming omero-test-infra in the same way (requires some design on the per-language etc)

I thinks that's missing then in this PR, the test-data script which executes the SimpleConnection example, otherwise the example is not run by the travis build.

Is the problem here mostly semantics i.e. test-data probably hints this file is the entrypoint for the tests, maybe setup-test-data or test-setup ?

@joshmoore
Copy link
Member

I could see us migrating the training examples to their own repo independently and consuming omero-test-infra in the same way (requires some design on the per-language etc)

👍

@joshmoore
Copy link
Member

@sbesson @dominikl : the state of this PR before the last commit that I just pushed is passing, so 👍 from me if we'd like to kick my out. Otherwise, this now is slightly more realistic:

2018-09-19 11:42:51,065 5444       [l.Client-1] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /tmp/tmp.4nt4m5GX3G/8bit-unsigned&pixelType=uint8&sizeZ=3&sizeC=5&sizeT=7&sizeX=512&sizeY=512.fake
Other imported objects:
Fileset:1
2018-09-19 11:42:51,068 5447       [l.Client-1] INFO      ome.formats.importer.cli.ErrorHandler - Number of errors: 0

==> Summary
1 file uploaded, 1 fileset created, 1 image imported, 0 errors in 0:00:03.455
+ IMAGE=Image:1
+ cleanup
+ rm -rf /tmp/tmp.4nt4m5GX3G
Deleted temp working directory /tmp/tmp.4nt4m5GX3G
+ echo 'Deleted temp working directory /tmp/tmp.4nt4m5GX3G'
Connected as testUser
Ready to get thumbnail

cc: @manics

private void loadFirstImage()
throws Exception
{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omit blank line

@sbesson
Copy link
Member Author

sbesson commented Sep 20, 2018

Thanks. As discussed this morning, merging this so that Travis (rather than ci.openmicroscopy.org) now captures the state of the integration tests against this minimal client example repository.

@sbesson sbesson merged commit c5e75be into ome:dev_5_4 Sep 20, 2018
@sbesson sbesson deleted the omero-test-infra branch September 20, 2018 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants