Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ WORKDIR /home/recceiver

COPY --from=build /home/recceiver/venv venv

CMD venv/bin/twistd --pidfile= --nodaemon recceiver
CMD ["venv/bin/twistd", "--pidfile=", "--nodaemon", "recceiver"]
2 changes: 1 addition & 1 deletion server/tests/integration/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def clone_container(
) -> str:
container_id = container_id or compose.get_container(host_name).ID
if not container_id:
raise Exception("Container not found")
raise RuntimeError("Container not found")
Comment thread
jacomago marked this conversation as resolved.

docker_client = DockerClient()
container = docker_client.containers.get(container_id)
Expand Down
18 changes: 10 additions & 8 deletions server/tests/integration/test_single_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,16 @@ def test_status_property_works_after_cf_restart(
# Arrange
# Act
restart_container(setup_compose, "cf")
cf_client = create_client_from_compose(setup_compose)
assert wait_for_sync(cf_client, check_connection_active)
refreshed_cf_client = create_client_from_compose(setup_compose)
assert wait_for_sync(refreshed_cf_client, check_connection_active)

# Assert
shutdown_container(setup_compose, "ioc1-1")
assert wait_for_sync(
cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY)
refreshed_cf_client,
lambda client: check_channel_property(client, DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY),
)
channels_inactive = cf_client.find(property=[("iocName", "IOC1-1")])
channels_inactive = refreshed_cf_client.find(property=[("iocName", "IOC1-1")])
assert all(INACTIVE_PROPERTY in ch["properties"] for ch in channels_inactive)


Expand All @@ -109,14 +110,15 @@ def test_status_property_works_between_cf_down(
shutdown_container(setup_compose, "ioc1-1")
time.sleep(10) # Wait to ensure CF is down while IOC is down
start_container(setup_compose, container_id=cf_container_id)
cf_client = create_client_from_compose(setup_compose)
assert wait_for_sync(cf_client, check_connection_active)
refreshed_cf_client = create_client_from_compose(setup_compose)
assert wait_for_sync(refreshed_cf_client, check_connection_active)

# Assert
assert wait_for_sync(
cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY)
refreshed_cf_client,
lambda client: check_channel_property(client, DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY),
)
channels_inactive = cf_client.find(property=[("iocName", "IOC1-1")])
channels_inactive = refreshed_cf_client.find(property=[("iocName", "IOC1-1")])
assert all(INACTIVE_PROPERTY in ch["properties"] for ch in channels_inactive)


Expand Down