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, …)
`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
Tip
Tango device server can be deployed directly from docker image as:
$ docker run -p 45450:45450 -it <image-name:tag> /usr/bin/python3 /app/src/ska_mid_dish_simulators/devices/SPF.py SKA001 -v4 -nodb -port 45450 -dlist mid-dish/simulator-spfc/SKA001