Skip to content

Commit fae5ac5

Browse files
committed
testing ci for nslookup
1 parent 4ae1970 commit fae5ac5

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.github/workflows/validate-nslookup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
shell: bash
8989
run: |
9090
export COHERENCE_SERVER_ADDRESS=coherence:///localhost:7574
91-
python -m poetry run make test
91+
python -m poetry run make nslookup
9292
9393
- name: Archive server logs
9494
if: failure()

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,17 @@ generate-proto: ## Generate Proto Files
171171
test: ##
172172
pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(UNIT_TESTS) $(E2E_TESTS)
173173

174+
# ----------------------------------------------------------------------------------------------------------------------
175+
# Run nslookup tests with code coverage
176+
# ----------------------------------------------------------------------------------------------------------------------
177+
.PHONY: test-nslookup
178+
test-nslookup: ##
179+
pytest -W error --cov src/coherence --cov-report=term --cov-report=html \
180+
--deselect tests/e2e/test_session.py::test_basics \
181+
--deselect tests/e2e/test_session.py::test_session_lifecycle \
182+
--deselect tests/e2e/test_session.py::test_fail_fast \
183+
$(UNIT_TESTS) $(E2E_TESTS)
184+
174185
# ----------------------------------------------------------------------------------------------------------------------
175186
# Run unit tests with code coverage
176187
# ----------------------------------------------------------------------------------------------------------------------

src/coherence/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ def __init__(
16681668
if tls_options is not None:
16691669
self._tls_options = tls_options
16701670

1671-
async def init(self) -> None:
1671+
async def resolve_ns_address(self) -> None:
16721672
if self.address.startswith("coherence:///"):
16731673
# Remove the prefix and split into host and port
16741674
_, ns_addr = self._address.split("coherence:///", 1)
@@ -1919,7 +1919,7 @@ def __init__(self, session_options: Optional[Options] = None):
19191919
async def create(session_options: Optional[Options] = None) -> Session:
19201920
if session_options is None:
19211921
session_options = Options()
1922-
await session_options.init()
1922+
await session_options.resolve_ns_address()
19231923
session: Session = Session(session_options)
19241924
await session._set_ready(False)
19251925
await session._handshake.handshake()

0 commit comments

Comments
 (0)