Test TimesTen

To test TimesTen, the test Pod runs a script that attempts to connect to the TimesTen database by using TimesTen's client/server access. If the script can connect to the database, the script then looks at internal metadata to verify that the database is functioning properly.

The test connects to the database as the test user. The TimesTen Operator provides the testUser metadata file that lets you define this test user. For more information about the testUser metadata file and this test user, see testUser and Install TimesTen Databases.

If you do not define a test user, the test fails. If you do define a test user, the user only has CONNECT privileges. This limits the test and the test user's access to the database.

The test verifies that the active standby pair of TimesTen Classic databases are up and running and that replication between them is functional.

To test TimesTen, you test the ttclassic chart release running in your namespace. Let's test TimesTen.

  1. Confirm the ttclassic release.
     helm list

    Output.

    NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
    samplettc       mynamespace     1               2023-10-23 23:18:03.740512897 +0000 UTC deployed        ttclassic-2211190.1.0   22.1.1.19.0
    samplettop      mynamespace     1               2023-10-23 23:04:40.492890589 +0000 UTC deployed        ttoperator-2211190.1.0  22.1.1.19.0
    ttcrd           mynamespace     1               2023-10-17 22:00:53.530832896 +0000 UTC deployed        ttcrd-2211190.1.0       22.1.1.19.0

    The samplettc release is installed in your namespace. You installed this release in Install TimesTen Databases.

  2. Confirm the TimesTenClassic object is running in your namespace.
     kubectl get ttc samplettc

    Output.

    NAME        STATE    ACTIVE        AGE
    samplettc   Normal   samplettc-0   10m

    The samplettc TimesTenClassic object is deployed in your namespace.

  3. Test TimesTen.
     helm test samplettc

    Output.

    NAME: samplettc
    LAST DEPLOYED: Mon Oct 23 23:18:03 2023
    NAMESPACE: mynamespace
    STATUS: deployed
    REVISION: 1
    TEST SUITE:     samplettc-ttclassic-test
    Last Started:   Mon Oct 23 23:29:27 2023
    Last Completed: Mon Oct 23 23:29:32 2023
    Phase:          Succeeded
    NOTES:
    Version 2211190.1.0 of the ttclassic chart has been installed.
    
    This release is named "samplettc".
    
    To learn more about the release, try:
    
      $ helm status samplettc
      $ helm get all samplettc
      $ helm history samplettc
    
    To rollback to a previous version of the chart, run:
    
      $ helm rollback samplettc <REVISION>
        - run 'helm history samplettc' for a list of revisions.

    The test for the samplettc release succeeded. Since the test succeeded, the test Pod is deleted.

Congratulations! You successfully tested TimesTen. The active and standy databases are up and running and replication between them is functional.