diff --git a/devices/integration_test/README.md b/devices/integration_test/README.md index e6bb8214902a4e1cb11f9e29c9c4534e25b77a67..9bf4efee9130b697ef7490a49e4eb818364ab835 100644 --- a/devices/integration_test/README.md +++ b/devices/integration_test/README.md @@ -1,3 +1,19 @@ # Integration tests -**Warning running these tests will make changes to your local system** \ No newline at end of file +**Warning running these tests will make changes to your local system** + +## Approach + +A special docker container is build to perform the integration tests. This +container will be build by the makefiles but should only be started by the +dedicated integration test script. This script will ensure that other containers +are running and are in the required state. + +* Launch pypcc-sim and sdptr-sim simulators. +* Reconfigure dsconfig to use these simulators. +* Create and start the integration-test container. + +## Limitations + +Our makefile will always launch the new container upon creation, resulting in +the integration tests actually being run twice. \ No newline at end of file diff --git a/devices/integration_test/test_device.py b/devices/integration_test/test_device.py index 9d5fe51d14cefc8828f535d50972277f6a90b9d0..03628082361fd5150a23dbc431041ea81d88f452 100644 --- a/devices/integration_test/test_device.py +++ b/devices/integration_test/test_device.py @@ -19,4 +19,6 @@ class TestDevice(base.IntegrationTestCase): def test_device(self): - d = DeviceProxy("LTS/SDP/1") \ No newline at end of file + d = DeviceProxy("LTS/SDP/1") + + self.assertEqual("ON", d.state()) diff --git a/devices/tox.ini b/devices/tox.ini index 6d930563226c56b468cd0b0bf1c0b8906c400cbe..94d33c3e392272ac7341e039791f567cf2a7b9b4 100644 --- a/devices/tox.ini +++ b/devices/tox.ini @@ -19,6 +19,7 @@ commands = stestr run {posargs} [testenv:integration] ; Warning running integration tests will make changes to your docker system! +; These tests should only be run by the integration-test docker container. passenv = TANGO_HOST setenv = TESTS_DIR=./integration_test commands = diff --git a/docker-compose/integration-test.yml b/docker-compose/integration-test.yml index b79f70500535caccc4802165def69963de658c14..e6a0e54939179ba0c4f5b043da3191dd9e11945d 100644 --- a/docker-compose/integration-test.yml +++ b/docker-compose/integration-test.yml @@ -27,4 +27,3 @@ services: - --strict - -- - tox -e integration - restart: on-failure