Skip to content

Latest commit

 

History

History
84 lines (71 loc) · 4.66 KB

README.md

File metadata and controls

84 lines (71 loc) · 4.66 KB

CE-Testsuite - JBoss DataGrid

This testsuite will test all JBoss DataGrid S2I application templates which are:

For all JDG tests some data is added into the cache then it is verified to make sure it was successfully added. The tests are done using the following methods:

The example below shows how an entry is added in the cache then retreived again, example using HotRod:

        RemoteCacheManager cacheManager = new RemoteCacheManager(
            new ConfigurationBuilder()
                .addServer()
                .host(host).port(port)
                .build()
        );
        RemoteCache<Object, Object> cache = cacheManager.getCache("default");
        cache.put("foo3", "bar3");
        assertEquals("bar3", cache.get("foo3"));

How to run the tests

The Ce-Testsuite uses the ce-arq which is a API that allow us to test our application templates in a running OpenshiftV3 instance. To run the tests you need:

  • Maven 3 or higher
  • Java 7 or higher
  • Openshift V3 or higher

The CE-Testsuite is divided by profiles, to enable the JDG profile all you need to do is to use the following maven parameter:

-Pjdg
Required ce-arq parameteres
  • -Pprofile_name
    • -Pjdg
  • -Dkubernetes.master=address of your running OSE instance (master note)
  • -Dkubernetes.registry.url=the registry address running in your ose instance
    • -Dkubernetes.registry.url=openshift-master.mydomain.com:5001
  • -Ddocker.url=Docker url address
  • -Drouter.hostIP=The OSE router IP
    • -Drouter.hostIP=192.168.1.254
      • You can change this parameter name in the pom.xml
Optional ce-arq parameteres
  • -Dtest=The test class name, if you want to run only one test, otherwise all tests will be executed
    • -Dtest=JdgMysqlTest
  • -Dkubernetes.ignore.cleanup=true (default is false), It will ignore the resources cleanup, so you can take a look in the used pods to troubleshooting

All those are java parameters, so use -D.


Running all tests

For this example we'll consider the IP address 192.168.1.254 for required parameters, Example:

$ mvn clean package test -Pjdg -Dkubernetes.master=https://192.168.1.254:8443 -Dkubernetes.registry.url=192.168.1.254:5001 -Ddocker.url=http://192.168.1.254:2375 -Drouter.hostIP=192.168.1.254
Running a specific test and ignoring the cleanup after the tests gets finished

Example:

$ mvn clean package test -Pjdg -Dkubernetes.master=https://192.168.1.254:8443 -Dkubernetes.registry.url=192.168.1.254:5001 -Ddocker.url=http://192.168.1.254:2375 -Drouter.hostIP=192.168.1.254 -Dtest=JdgMysqlTest -Dkubernetes.ignore.cleanup=true

What this tests cover?

This test covers all basic operations to make sure the docker image generated by the used application templates will work as expected, it will do basic operations against the available services, Rest, Memcached and HotRod, which include:

  • Add values in the cache
  • Retrieve values from cache
  • Test with cache persisted on databases (MySQL ans PostgreSQL)
    • Test with persistent databases

The tests are also executed using SSL.

Found an issue?

Please, feel free to report the issue that you found here.

For feedbacks please send us an email (cloud-enablement-feedback@redhat.com) and let us know what you are thinking.