Testing the Watson Assistant installation
After you install Watson Assistant, you can run a deployment verification test (DVT) to make sure that your service is working properly.
- Permissions you need for this task:
- You must be an administrator of the Red Hat® OpenShift® project.
This testing is a convenient way to check that a deployment is healthy. You can run a test immediately after deployment or periodically. Follow the steps in Running the test to run the first test on your Watson Assistant instance. If you already ran a test, follow the steps in Rerunning the test.
Running the test
Complete the following steps to run the first DVT on your Watson Assistant instance:
- Go to the project where Watson
Assistant is
installed:
oc project ${PROJECT_CPD_INSTANCE}
- Export the name of your Watson
Assistant instance as an environment
variable:
export INSTANCE=`oc get wa -n ${PROJECT_CPD_INSTANCE} |grep -v NAME| awk '{print $1}'` export VERSION=`oc get wa -n ${PROJECT_CPD_INSTANCE} |grep -v NAME| awk '{print $2}'`
- Run the test:
cat <<EOF | oc apply -f - apiVersion: assistant.watson.ibm.com/v1 kind: WatsonAssistantDvt metadata: name: ${INSTANCE} namespace: ${PROJECT_CPD_INSTANCE} annotations: oppy.ibm.com/disable-rollback: "true" spec: labels: "app.kubernetes.io/instance": ${INSTANCE} version: ${VERSION} assistantInstanceName: ${INSTANCE} # The cucumber test tags to execute testTags: "@accuracy,@callouts,@dialogs,@dialogErrors,@dialogV1,@dialogV1errors,@embedsearch,@entities,@exactMatch,@folders,@fuzzy,@generic,@healthcheck,@intents,@languagexx,@newse,@openentities,@patterns,@prebuilt,@recommends,@search,@slots,@spellcheck,@spellcheckfr,@v2authorskill,@v2authorwksp,@v2healthcheck,@v2skillref,@v2snapshots,@workspaces" cluster: type: "private" # :image_pull_secrets: pull secret names imagePullSecrets: [] dockerRegistryPrefix: "" EOF
Your changes initiate a pod named
${INSTANCE}-dvt
. This${INSTANCE}-dvt
pod starts a pod nameddvt
that runs the verification test. - Check whether the
${INSTANCE}-dvt
pod is available:oc get pods |grep dvt
- Optional: You can run the following command to view the logs from the pod while it is
running:
oc logs ${INSTANCE}-dvt -f
- Check the status of the
test:
When the test is successful, a message similar to the following example is displayed:oc get dvt ${INSTANCE}
NAME PHASE TESTRESULT VERSION AGE wa Completed Passed 4.6.5 5h54m
Rerunning the test
Complete the following steps to rerun a DVT:
- If you need to rerun the test, run the following command to delete the DVT custom
resource:
oc delete dvt ${INSTANCE}
- After you delete the custom resource, complete the steps from Running the test.