======= Testing ======= Unit Tests ^^^^^^^^^^ This runs a set of tests against the simulated tango devices (using the `DeviceTestContext`_). Tests output are captured in the ``python-test`` job. Acceptance Tests ^^^^^^^^^^^^^^^^ This deploys the entire tango infrastructure (device, database, etc) in a kubernetes cluster. These tests are captured in the ``k8-test`` job. Testing Locally without Kubernetes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This library is packaged as a helm chart to be deployed in a kubernetes cluster. Beyond verifying changes based on pipeline outputs from ``python-test`` and ``k8s-test`` jobs, it's beneficial (in some cases) to be able to deploy the devices locally without needing to spin up a kubernetes cluster to quickly verify changes. This can be run in an isolated environment (virtual environment, docker container, ...) .. tabs:: .. tab:: Deploy simulators w/o k8s .. code-block:: rst `SPF Simulator` $ python SPF.py SKA001 -v4 -nodb -host 127.0.0.1 -port 45678 -dlist mid-dish/simulator-spfc/SKA001 `SPFRx Simulator` $ python SPFRX.py SKA001 -v4 -nodb -host 127.0.0.1 -port 56789 -dlist mid-dish/simulator-spfrx/SKA001 `DS OPCUA Simulator` $ python ds_opcua_server.py --dishid=ska001 # dish id defaults to ska001 if no arguments provided .. tip:: Tango device server can be deployed directly from docker image as: .. code-block:: rst $ docker run -p 45450:45450 -it /usr/bin/python3 /app/src/ska_mid_dish_simulators/devices/SPF.py SKA001 -v4 -nodb -port 45450 -dlist mid-dish/simulator-spfc/SKA001 .. _DeviceTestContext: https://gitlab.com/tango-controls/pytango/-/blob/v9.5.0/tango/test_context.py?ref_type=tags#L740