diff --git a/client/demoApp/Db/Makefile b/client/demoApp/Db/Makefile index 60db2767..858424cb 100644 --- a/client/demoApp/Db/Makefile +++ b/client/demoApp/Db/Makefile @@ -11,8 +11,6 @@ include $(TOP)/configure/CONFIG # Create and install (or just install) into /db # databases, templates, substitutions like this DB += somerecords.db -DB += archive.db -DB += archive_bugtest.db #---------------------------------------------------- # If .db template is not named *.template add # _template = diff --git a/client/demoApp/Db/archive.db b/client/demoApp/Db/archive.db deleted file mode 100644 index 17b4effb..00000000 --- a/client/demoApp/Db/archive.db +++ /dev/null @@ -1,11 +0,0 @@ - -record(ai, "$(P)ai:archive") { - info("test", "testing") - info("archive", "MONITOR@1") -} - -record(longout, "$(P)lo:archive") { - info("test", "testing") - info("hello", "world") - info("archive", "default") -} diff --git a/client/demoApp/Db/archive_bugtest.db b/client/demoApp/Db/archive_bugtest.db deleted file mode 100644 index 833e0bc6..00000000 --- a/client/demoApp/Db/archive_bugtest.db +++ /dev/null @@ -1,10 +0,0 @@ - -record(ai, "$(P)ai:archive") { - info("test", "testing") -} - -record(longout, "$(P)lo:archive") { - info("test", "testing") - info("hello", "world") - info("archive", "default") -} diff --git a/client/iocBoot/iocdemo/st.cmd b/client/iocBoot/iocdemo/st.cmd index 35c72fa0..85594c30 100755 --- a/client/iocBoot/iocdemo/st.cmd +++ b/client/iocBoot/iocdemo/st.cmd @@ -29,6 +29,5 @@ addReccasterExcludePattern("*exclude_this") ## Load record instances dbLoadRecords("../../db/reccaster.db", "P=$(IOCSH_NAME):") dbLoadRecords("../../db/somerecords.db","P=$(IOCSH_NAME):") -dbLoadRecords("../../db/archive.db", "P=$(IOCSH_NAME):") iocInit() diff --git a/client/iocBoot/iocdemo/st_bugtest.cmd b/client/iocBoot/iocdemo/st_bugtest.cmd deleted file mode 100644 index c1e16157..00000000 --- a/client/iocBoot/iocdemo/st_bugtest.cmd +++ /dev/null @@ -1,31 +0,0 @@ -#!../../bin/linux-x86_64-debug/demo - -## You may have to change demo to something else -## everywhere it appears in this file - -< envPaths - -## Register all support components -dbLoadDatabase("../../dbd/demo.dbd",0,0) -demo_registerRecordDeviceDriver(pdbbase) - -var(reccastTimeout, 5.0) -var(reccastMaxHoldoff, 5.0) - -epicsEnvSet("IOCNAME", "$(IOCSH_NAME)") -epicsEnvSet("ENGINEER", "myself") -epicsEnvSet("LOCATION", "myplace") - -epicsEnvSet("CONTACT", "mycontact") -epicsEnvSet("BUILDING", "mybuilding") -epicsEnvSet("SECTOR", "mysector") - -addReccasterEnvVars("CONTACT", "SECTOR") -addReccasterEnvVars("BUILDING") - -## Load record instances -dbLoadRecords("../../db/reccaster.db", "P=$(IOCSH_NAME):") -dbLoadRecords("../../db/somerecords.db","P=$(IOCSH_NAME):") -dbLoadRecords("../../db/archive_bugtest.db", "P=$(IOCSH_NAME):") - -iocInit() diff --git a/client/iocBoot/iocdemo/st_test.cmd b/client/iocBoot/iocdemo/st_test.cmd deleted file mode 100755 index 420f8656..00000000 --- a/client/iocBoot/iocdemo/st_test.cmd +++ /dev/null @@ -1,23 +0,0 @@ -#!../../bin/linux-x86_64-debug/demo - -## You may have to change demo to something else -## everywhere it appears in this file - -< envPaths - -## Register all support components -dbLoadDatabase("../../dbd/demo.dbd",0,0) -demo_registerRecordDeviceDriver(pdbbase) - -var(reccastTimeout, 5.0) -var(reccastMaxHoldoff, 5.0) - -epicsEnvSet("IOCNAME", "myioc") -epicsEnvSet("ENGINEER", "myself") -epicsEnvSet("LOCATION", "myplace") - - -## Load record instances -dbLoadRecords("../../db/cfstore_test_records.db", "P=test:") - -iocInit() diff --git a/server/recceiver/scripts/readme b/server/recceiver/scripts/readme deleted file mode 100644 index db5b87c4..00000000 --- a/server/recceiver/scripts/readme +++ /dev/null @@ -1,75 +0,0 @@ -MANUAL TEST LOG: - -PASSED - Clean and poll on recsync start -PASSED - Clean and poll on recsync close -PASSED - Clean and poll on IOC start -PASSED - Clean and poll on IOC close -PASSED - 100 IOCs overlapping 1 IOC - -Clean and poll on recsync start: -0.a CF on -0.b add_extra_properties - - should see the new props in CF -1. CF off -2. Start recsync - - will poll in clean -3. Enable CF - - polling completes -4. CF will clean -5. Check result - - all channels inactive - -Clean and poll on recsync close: -1. CF on -2. Start recsync -3. add_extra_properties - - should see new props in CF -4. CF off -5. Recsync off - - will poll in clean - - (NYI) will give up if waiting too long -6. CF on -7. Check result - - all channels inactive - -Commit poll on IOC start: -1. Enable CF -2. Start recsync - - will perform clean -3. Disable CF -4. Start IOC - - waits for recsync announcement - - connects and polls commit -5. Enable CF -6. Commit poll fails once, reconnects, and commits -7. Check result - - all channels active - -Commit poll on IOC close: -1. Enable CF -2. Start Recsync -3. Start IOC -4. Wait for IOC to connect and commit - - all IOC channels now active -5. Disable CF -6. Close IOC - - commits [] and polls -7. Enable CF - - reconnects after polling and completes commit -8. Check result - - all channels inactive - -100 IOCs overlapping 1 IOC: -0. * Disable logging in demo.conf * -1. Enable CF -2. Start recsync -3. Start st.cmd in a command prompt - - IOC will connect and commit channels - - 4 channels will be active -4. run test_mock_iocs.py - - wait forever - - all channels will be active - - 2 channels will still belong to st.cmd -5. kill test_mock_iocs.py or killall st_test.cmd - - wait forever again - - 4 channels will be active, all belonging to st.cmd diff --git a/server/recceiver/scripts/test_mock_iocs.py b/server/recceiver/scripts/test_mock_iocs.py deleted file mode 100644 index 301cc511..00000000 --- a/server/recceiver/scripts/test_mock_iocs.py +++ /dev/null @@ -1,53 +0,0 @@ -import os -import signal -import sys -import threading -import time - -iocexecutable = "st.cmd" - - -def startIOC(): - # conf needs to be set - pid, fd = os.forkpty() - if pid == 0: - os.chdir("../../../client/iocBoot/iocdemo") - print(os.curdir) - os.execv("st_test.cmd", [""]) - return pid, fd - - -def readfd(fd): - while 1: - _ = str(os.read(fd, 16384).strip("\n")) - - -def handler(signum, frame): - global pids - for pid in pids: - os.kill(pid, signal.SIGKILL) - sys.exit() - - -def main(): - global pids - pids = [] - signal.signal(signal.SIGTERM, handler) - os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) # Uses a filename, not good, also only works on linux? - threads = [] - for i in range(1, 100): - iocpid, iocfd = startIOC() - pids.append(iocpid) - print("len pids: ", len(pids)) - iocthread = threading.Thread(group=None, target=readfd, args=(iocfd,), name="iocthread", kwargs={}) - threads.append(iocthread) - iocthread.start() - try: - while 1: - time.sleep(1) - except KeyboardInterrupt: - sys.exit() - - -if __name__ == "__main__": - main() diff --git a/server/tests/client_checks.py b/server/tests/client_checks.py index 9af7ce0e..a5bda1ee 100644 --- a/server/tests/client_checks.py +++ b/server/tests/client_checks.py @@ -11,6 +11,7 @@ INACTIVE_PROPERTY = {"name": "pvStatus", "owner": "admin", "value": "Inactive", "channels": []} MAX_WAIT_SECONDS = 180 TIME_PERIOD_INCREMENT = 2 +DEFAULT_CHANNEL_NAME = "IOC1-1:ai:test" def channel_match(channel0, channel1, properties_to_match: list[str]): @@ -28,7 +29,7 @@ def channels_match(channels_begin, channels_end, properties_to_match: list[str]) channel_match(channel, channels_end[channel_index], properties_to_match) -def check_channel_count(cf_client: ChannelFinderClient, name="*", expected_channel_count=24): +def check_channel_count(cf_client: ChannelFinderClient, expected_channel_count, name="*"): channels = cf_client.find(name=name) LOG.debug("Found %s channels", len(channels)) return len(channels) == expected_channel_count @@ -52,7 +53,7 @@ def wait_for_sync(cf_client: ChannelFinderClient, check: Callable[[ChannelFinder return False -def create_client_and_wait(compose: DockerCompose, expected_channel_count=24) -> ChannelFinderClient: +def create_client_and_wait(compose: DockerCompose, expected_channel_count) -> ChannelFinderClient: LOG.info("Waiting for channels to sync") cf_client = create_client_from_compose(compose) assert wait_for_sync( diff --git a/server/docker/config/cf2.conf b/server/tests/docker/config/cf2.conf similarity index 100% rename from server/docker/config/cf2.conf rename to server/tests/docker/config/cf2.conf diff --git a/server/docker/test-bash-ioc.yml b/server/tests/docker/test-bash-ioc.yml similarity index 68% rename from server/docker/test-bash-ioc.yml rename to server/tests/docker/test-bash-ioc.yml index 17b1d5a0..ef1d5259 100644 --- a/server/docker/test-bash-ioc.yml +++ b/server/tests/docker/test-bash-ioc.yml @@ -1,10 +1,10 @@ name: test-bash-ioc include: - - cf-compose.yml + - ../../docker/cf-compose.yml services: recc1: extends: - file: ../compose.yml + file: ../../compose.yml service: recc depends_on: cf: @@ -16,7 +16,7 @@ services: - net-2-cf ioc1-1: extends: - file: ../../client/ioc-compose.yml + file: ../../../client/ioc-compose.yml service: ioc1 environment: - IOCSH_NAME=IOC1-1 @@ -28,7 +28,17 @@ services: command: bash networks: - net-1-recc-1 + volumes: + - ioc:/ioc networks: net-1-recc-1: driver: bridge + +volumes: + ioc: + driver: local + driver_opts: + type: none + device: ../ioc + o: bind diff --git a/server/docker/test-multi-recc.yml b/server/tests/docker/test-multi-recc.yml similarity index 82% rename from server/docker/test-multi-recc.yml rename to server/tests/docker/test-multi-recc.yml index cbe24010..5cc0dcb8 100644 --- a/server/docker/test-multi-recc.yml +++ b/server/tests/docker/test-multi-recc.yml @@ -1,10 +1,10 @@ name: test-multi-recc include: - - cf-compose.yml + - ../../docker/cf-compose.yml services: recc1: extends: - file: ../compose.yml + file: ../../compose.yml service: recc depends_on: cf: @@ -16,7 +16,7 @@ services: - net-2-cf ioc1-1: extends: - file: ../../client/ioc-compose.yml + file: ../../../client/ioc-compose.yml service: ioc1 depends_on: recc1: @@ -27,6 +27,9 @@ services: hostname: ioc1-1 networks: - net-1-recc-1 + command: ./demo /ioc/st.cmd + volumes: + - ioc:/ioc ioc1-2: extends: ioc1-1 @@ -72,3 +75,11 @@ networks: driver: bridge net-1-recc-2: driver: bridge + +volumes: + ioc: + driver: local + driver_opts: + type: none + device: ../ioc + o: bind diff --git a/server/docker/test-single-ioc.yml b/server/tests/docker/test-single-ioc.yml similarity index 65% rename from server/docker/test-single-ioc.yml rename to server/tests/docker/test-single-ioc.yml index 6e4908df..41cb4424 100644 --- a/server/docker/test-single-ioc.yml +++ b/server/tests/docker/test-single-ioc.yml @@ -1,10 +1,10 @@ name: test-single-ioc include: - - cf-compose.yml + - ../../docker/cf-compose.yml services: recc1: extends: - file: ../compose.yml + file: ../../compose.yml service: recc depends_on: cf: @@ -16,7 +16,7 @@ services: - net-2-cf ioc1-1: extends: - file: ../../client/ioc-compose.yml + file: ../../../client/ioc-compose.yml service: ioc1 depends_on: recc1: @@ -27,7 +27,18 @@ services: hostname: ioc1-1 networks: - net-1-recc-1 + command: ./demo /ioc/st.cmd + volumes: + - ioc:/ioc networks: net-1-recc-1: driver: bridge + +volumes: + ioc: + driver: local + driver_opts: + type: none + device: ../ioc + o: bind diff --git a/server/tests/ioc/st.cmd b/server/tests/ioc/st.cmd new file mode 100644 index 00000000..c2bac687 --- /dev/null +++ b/server/tests/ioc/st.cmd @@ -0,0 +1,13 @@ +## Register all support components +dbLoadDatabase("/recsync/dbd/demo.dbd",0,0) +demo_registerRecordDeviceDriver(pdbbase) + +var(reccastTimeout, 5.0) +var(reccastMaxHoldoff, 5.0) + +epicsEnvSet("IOCNAME", "$(IOCSH_NAME)") + +## Load record instances +dbLoadRecords("/ioc/$(DB_FILE=test.db)","P=$(IOCSH_NAME):") + +iocInit() diff --git a/server/tests/ioc/test.db b/server/tests/ioc/test.db new file mode 100644 index 00000000..7fbe7c25 --- /dev/null +++ b/server/tests/ioc/test.db @@ -0,0 +1,7 @@ + +record(ai, "$(P)ai:test") { + alias("$(P)ai:test:alias") + info("test", "testing") + info("archive", "MONITOR@1") + field(DESC, "testdesc") +} diff --git a/server/tests/ioc/test_remove_infotag.db b/server/tests/ioc/test_remove_infotag.db new file mode 100644 index 00000000..5ee53d2e --- /dev/null +++ b/server/tests/ioc/test_remove_infotag.db @@ -0,0 +1,6 @@ + +record(ai, "$(P)ai:test") { + alias("$(P)ai:test:alias") + info("test", "testing") + field(DESC, "testdesc") +} diff --git a/server/tests/test_bash_ioc.py b/server/tests/test_bash_ioc.py index 85a087bb..238e3d47 100644 --- a/server/tests/test_bash_ioc.py +++ b/server/tests/test_bash_ioc.py @@ -1,13 +1,20 @@ import logging import threading from pathlib import Path +from typing import Optional from testcontainers.compose import DockerCompose from docker import DockerClient from docker.models.containers import Container -from .client_checks import INACTIVE_PROPERTY, check_channel_property, create_client_and_wait, wait_for_sync +from .client_checks import ( + DEFAULT_CHANNEL_NAME, + INACTIVE_PROPERTY, + check_channel_property, + create_client_and_wait, + wait_for_sync, +) from .docker import ComposeFixtureFactory LOG: logging.Logger = logging.getLogger(__name__) @@ -18,17 +25,17 @@ encoding="utf-8", ) -setup_compose = ComposeFixtureFactory(Path("docker") / Path("test-bash-ioc.yml")).return_fixture() +setup_compose = ComposeFixtureFactory(Path("tests") / "docker" / "test-bash-ioc.yml").return_fixture() -def docker_exec_new_command(container: Container, command: str): +def docker_exec_new_command(container: Container, command: str, env: Optional[dict] = None) -> None: def stream_logs(exec_result, cmd: str): if LOG.level <= logging.DEBUG: LOG.debug("Logs from %s with command %s", container.name, cmd) for line in exec_result.output: LOG.debug(line.decode().strip()) - exec_result = container.exec_run(command, tty=True, stream=True) + exec_result = container.exec_run(command, tty=True, stream=True, environment=env) log_thread = threading.Thread( target=stream_logs, args=( @@ -47,36 +54,35 @@ def test_remove_property(self, setup_compose: DockerCompose) -> None: # noqa: F ioc_container = setup_compose.get_container("ioc1-1") docker_client = DockerClient() docker_ioc = docker_client.containers.get(ioc_container.ID) - docker_exec_new_command(docker_ioc, "./demo /recsync/iocBoot/iocdemo/st.cmd") + docker_exec_new_command(docker_ioc, "./demo /ioc/st.cmd") LOG.info("Waiting for channels to sync") - cf_client = create_client_and_wait(setup_compose, expected_channel_count=8) + cf_client = create_client_and_wait(setup_compose, expected_channel_count=2) - # Check ioc1-1 has ai:archive with info tag "archive" - LOG.debug('Checking ioc1-1 has ai:archive with info tag "archive"') - archive_channel_name = "IOC1-1:ai:archive" - archive_channel = cf_client.find(name=archive_channel_name) + # Check ioc1-1 has ai:test with info tag "archive" + LOG.debug('Checking ioc1-1 has ai:test with info tag "archive"') + channel = cf_client.find(name=DEFAULT_CHANNEL_NAME) - def get_len_archive_properties(archive_channel): - return len([prop for prop in archive_channel[0]["properties"] if prop["name"] == "archive"]) + def get_len_archive_properties(channel): + return len([prop for prop in channel[0]["properties"] if prop["name"] == "archive"]) - assert get_len_archive_properties(archive_channel) == 1 + assert get_len_archive_properties(channel) == 1 docker_ioc.stop() LOG.info("Waiting for channels to go inactive") assert wait_for_sync( cf_client, - lambda cf_client: check_channel_property(cf_client, name=archive_channel_name, prop=INACTIVE_PROPERTY), + lambda cf_client: check_channel_property(cf_client, name=DEFAULT_CHANNEL_NAME, prop=INACTIVE_PROPERTY), ) docker_ioc.start() - docker_exec_new_command(docker_ioc, "./demo /recsync/iocBoot/iocdemo/st_bugtest.cmd") + docker_exec_new_command(docker_ioc, "./demo /ioc/st.cmd", env={"DB_FILE": "test_remove_infotag.db"}) # Detach by not waiting for the thread to finish LOG.debug("ioc1-1 restart") - assert wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, name=archive_channel_name)) + assert wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, name=DEFAULT_CHANNEL_NAME)) LOG.debug("ioc1-1 has restarted and synced") - archive_channel = cf_client.find(name=archive_channel_name) - LOG.debug("archive channel: %s", archive_channel) - assert get_len_archive_properties(archive_channel) == 0 + channel = cf_client.find(name=DEFAULT_CHANNEL_NAME) + LOG.debug("archive channel: %s", channel) + assert get_len_archive_properties(channel) == 0 diff --git a/server/tests/test_multiple_recceiver.py b/server/tests/test_multiple_recceiver.py index 0fc864a5..c6cbeb53 100644 --- a/server/tests/test_multiple_recceiver.py +++ b/server/tests/test_multiple_recceiver.py @@ -5,17 +5,17 @@ from channelfinder import ChannelFinderClient from testcontainers.compose import DockerCompose -from .client_checks import create_client_and_wait +from .client_checks import DEFAULT_CHANNEL_NAME, create_client_and_wait from .docker import ComposeFixtureFactory LOG: logging.Logger = logging.getLogger(__name__) RECSYNC_RESTART_DELAY = 30 # Number of channels expected in the default setup -# 4 iocs, 6 channels per ioc (2 reccaster.db, 2 somerecords.db, 2 aliases in somerecords.db) -EXPECTED_DEFAULT_CHANNEL_COUNT = 32 +# 4 iocs, 1 channel 1 alias in archive.db +EXPECTED_DEFAULT_CHANNEL_COUNT = 4 * 2 -setup_compose = ComposeFixtureFactory(Path("docker") / Path("test-multi-recc.yml")).return_fixture() +setup_compose = ComposeFixtureFactory(Path("tests") / "docker" / "test-multi-recc.yml").return_fixture() @pytest.fixture(scope="class") @@ -27,23 +27,23 @@ class TestMultipleRecceiver: def test_number_of_channels_and_channel_name(self, cf_client: ChannelFinderClient) -> None: channels = cf_client.find(name="*") assert len(channels) == EXPECTED_DEFAULT_CHANNEL_COUNT - assert channels[0]["name"] == "IOC1-1:Msg-I" + assert channels[0]["name"] == DEFAULT_CHANNEL_NAME # Smoke Test Default Properties def test_number_of_aliases_and_alais_property(self, cf_client: ChannelFinderClient) -> None: channels = cf_client.find(property=[("alias", "*")]) - assert len(channels) == 8 - assert channels[0]["name"] == "IOC1-1:lix1" + assert len(channels) == 4 + assert channels[0]["name"] == DEFAULT_CHANNEL_NAME + ":alias" assert { "name": "alias", - "value": "IOC1-1:li", + "value": DEFAULT_CHANNEL_NAME, "owner": "admin", "channels": [], } in channels[0]["properties"] def test_number_of_recordDesc_and_property(self, cf_client: ChannelFinderClient) -> None: channels = cf_client.find(property=[("recordDesc", "*")]) - assert len(channels) == 4 + assert len(channels) == 8 assert { "name": "recordDesc", "value": "testdesc", @@ -56,7 +56,7 @@ def test_number_of_recordType_and_property(self, cf_client: ChannelFinderClient) assert len(channels) == EXPECTED_DEFAULT_CHANNEL_COUNT assert { "name": "recordType", - "value": "stringin", + "value": "ai", "owner": "admin", "channels": [], } in channels[0]["properties"] diff --git a/server/tests/test_single_ioc.py b/server/tests/test_single_ioc.py index c767639b..50a700cc 100644 --- a/server/tests/test_single_ioc.py +++ b/server/tests/test_single_ioc.py @@ -7,6 +7,7 @@ from testcontainers.compose import DockerCompose from .client_checks import ( + DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY, channels_match, check_channel_property, @@ -25,9 +26,9 @@ LOG: logging.Logger = logging.getLogger(__name__) -EXPECTED_DEFAULT_CHANNEL_COUNT = 8 +EXPECTED_DEFAULT_CHANNEL_COUNT = 2 -setup_compose = ComposeFixtureFactory(Path("docker") / Path("test-single-ioc.yml")).return_fixture() +setup_compose = ComposeFixtureFactory(Path("tests") / "docker" / "test-single-ioc.yml").return_fixture() @pytest.fixture(scope="class") @@ -39,7 +40,7 @@ class TestRestartIOC: def test_channels_same_after_restart(self, setup_compose: DockerCompose, cf_client: ChannelFinderClient) -> None: # noqa: F811 channels_begin = cf_client.find(name="*") restart_container(setup_compose, "ioc1-1") - assert wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, "IOC1-1:Msg-I")) + assert wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME)) channels_end = cf_client.find(name="*") assert len(channels_begin) == len(channels_end) channels_match(channels_begin, channels_end, PROPERTIES_TO_MATCH) @@ -52,12 +53,12 @@ def test_manual_channels_same_after_restart( test_property = {"name": "test_property", "owner": "testowner"} cf_client.set(properties=[test_property]) test_property_value = test_property | {"value": "test_value"} - channels = cf_client.find(name="IOC1-1:Msg-I") + channels = cf_client.find(name=DEFAULT_CHANNEL_NAME) channels[0]["properties"] = [test_property_value] cf_client.set(property=test_property) channels_begin = cf_client.find(name="*") restart_container(setup_compose, "ioc1-1") - assert wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, "IOC1-1:Msg-I")) + assert wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME)) channels_end = cf_client.find(name="*") assert len(channels_begin) == len(channels_end) channels_match(channels_begin, channels_end, PROPERTIES_TO_MATCH + ["test_property"]) @@ -85,7 +86,7 @@ def test_status_property_works_after_cf_restart( # Assert shutdown_container(setup_compose, "ioc1-1") assert wait_for_sync( - cf_client, lambda cf_client: check_channel_property(cf_client, "IOC1-1:Msg-I", INACTIVE_PROPERTY) + cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY) ) channels_inactive = cf_client.find(property=[("iocName", "IOC1-1")]) assert all(INACTIVE_PROPERTY in ch["properties"] for ch in channels_inactive) @@ -109,7 +110,7 @@ def test_status_property_works_between_cf_down( # Assert assert wait_for_sync( - cf_client, lambda cf_client: check_channel_property(cf_client, "IOC1-1:Msg-I", INACTIVE_PROPERTY) + cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME, INACTIVE_PROPERTY) ) channels_inactive = cf_client.find(property=[("iocName", "IOC1-1")]) assert all(INACTIVE_PROPERTY in ch["properties"] for ch in channels_inactive) @@ -123,6 +124,6 @@ def test_move_ioc_host( ) -> None: channels_begin = cf_client.find(name="*") clone_container(setup_compose, "ioc1-1-new", host_name="ioc1-1") - wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, "IOC1-1:Msg-I")) + wait_for_sync(cf_client, lambda cf_client: check_channel_property(cf_client, DEFAULT_CHANNEL_NAME)) channels_end = cf_client.find(name="*") assert len(channels_begin) == len(channels_end)