Skip to content

Configuring Test Database

Endi S. Dewata edited this page Sep 6, 2024 · 9 revisions

Overview

By default the CI will perform the tests using a DS from quay.io/389ds/dirsrv container image. Sometimes it’s necessary to perform the tests using a different database (e.g. using a DS from RPM packages).

In PKI 11.6 or later the test database can be configured by creating a GitHub variable called DS_IMAGE to store the container image URL. To reset the test database simply remove the variable.

In PKI 11.5 the test database can be configured by creating a GitHub variable called DB_IMAGE to store the container image URL. To reset the test database simply remove the variable.

Prior to PKI 11.5 the test database can be configured by creating a GitHub secret called BASE64_DATABASE to store the base64-encoded value of the container image URL. To reset the test database simply remove the secret.

Configuring Test Database

In PKI 11.6 or later create a variable:

  • Go to SettingsSecrets and variablesActionsVariables.

  • Click New repository variable.

  • Enter DS_IMAGE as the variable name.

  • Enter the DS image (e.g. edewata/dirsrv) as the variable value.

  • Click Add variable.

In PKI 11.5 create a variable:

  • Go to SettingsSecrets and variablesActionsVariables.

  • Click New repository variable.

  • Enter DB_IMAGE as the variable name.

  • Enter the database image (e.g. edewata/dirsrv) as the variable value.

  • Click Add variable.

Prior to PKI 11.5 encode the database image (e.g. edewata/dirsrv) as follows:

$ base64 << EOF
{
    "image": "edewata/dirsrv"
}
EOF
ewogICAgImltYWdlIjogImVkZXdhdGEvZGlyc3J2Igp9Cg==

Then create the secret:

  • Go to SettingsSecrets.

  • Click New repository secret.

  • Enter BASE64_DATABASE as the secret name.

  • Enter the base64-encoded value as the secret value.

  • Click Add secret

Resetting Test Database

To reset the test database in PKI 11.6 or later, remove the variable:

  • Go to SettingsSecrets and variablesActionsVariables.

  • Click Remove next to DS_IMAGE.

  • Click Yes, remove this variable.

To reset the test database in PKI 11.5, remove the variable:

  • Go to SettingsSecrets and variablesActionsVariables.

  • Click Remove next to DB_IMAGE.

  • Click Yes, remove this variable.

To reset the test database prior to PKI 11.5, remove the secret:

  • Go to SettingsSecrets.

  • Click Remove next to BASE64_DATABASE.

  • Click Yes, remove this secret.

Clone this wiki locally