Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
linknum23 committed Dec 21, 2023
1 parent 8571652 commit 2d1bbb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,7 @@ def test_zeroconf():

# get default network interface
iface = ni.gateways()['default'][ni.AF_INET][1]
FAKE_PORT = 9898

# first time ni.ifaddresses is called in the CI system it fails
try:
Expand All @@ -1009,7 +1010,7 @@ def on_service_state_change(zeroconf: Zeroconf, service_type: str, name: str, st

# advertise amplipi-api service (start this before the listener to verify it can be found after advertisement)
event = Event()
zc_reg = Process(target=amplipi.app.advertise_service, args=(9898,event))
zc_reg = Process(target=amplipi.app.advertise_service, args=(FAKE_PORT,event))
zc_reg.start()
sleep(4) # wait for a bit to make sure the service is started

Expand Down Expand Up @@ -1039,7 +1040,7 @@ def on_service_state_change(zeroconf: Zeroconf, service_type: str, name: str, st

# check advertisememts
assert AMPLIPI_ZC_NAME in services_advertised
assert services_advertised[AMPLIPI_ZC_NAME].port == 9898
assert services_advertised[AMPLIPI_ZC_NAME].port == FAKE_PORT

@pytest.mark.parametrize('zid', base_zone_ids())
def test_set_zone_vol(client, zid):
Expand Down

0 comments on commit 2d1bbb1

Please sign in to comment.