TSG Diagnose
TSG Diagnose is a tool designed to check the basic functionality and availability of TSG.
Introduction
TSG Diagnose comprises multiple test cases, each simulating real user requests. The outcome of these requests determines whether a case is successful. TSG Diagnose uses containers to construct realistic client and server environments for these tests. Currently, the TSG Diangose feature supports running in both Docker and k3s environments.
Installation
You can install TSG Diagnose RPM on a TSG-OS machine. Ensure that you install the TSG-OS YUM repository before proceeding with the installation.
dnf install tsg-diagnose
Docker
If you have installed TSG Diagnose with Docker support, you can use the following command to build the TSG Diagnose runtime environment.
docker load < /opt/tsg/tsg-diagnose/images/tsg_diagnose_server_web.tar
docker load < /opt/tsg/tsg-diagnose/images/tsg_diagnose_server_dns.tar
docker load < /opt/tsg/tsg-diagnose/images/tsg_diagnose_client.tar
docker-compose down --remove-orphans; docker-compose up -d --remove-orphans
k3s
If you have installed TSG Diagnose with k3s support, you can use the following command to build the TSG Diagnose runtime environment.
k3s ctr image import /opt/tsg/tsg-diagnose/images/tsg_diagnose_server_web.tar
k3s ctr image import /opt/tsg/tsg-diagnose/images/tsg_diagnose_server_dns.tar
k3s ctr image import /opt/tsg/tsg-diagnose/images/tsg_diagnose_client.tar
kubectl apply -f /opt/tsg/tsg-diagnose/k8s-resource/tsg-diagnose-client.yaml
kubectl apply -f /opt/tsg/tsg-diagnose/k8s-resource/tsg-diagnose-server.yaml
Usage
There are two commands available to run TSG Diagnose:
- tsg-diagnose-oneshot: Runs the test cases in a one-shot mode.
- tsg-diagnose-periodical: Runs the test cases periodically.
# Run test cases once
tsg-diagnose-oneshot
# Run test cases periodically
tsg-diagnose-periodical