From 7a3bbfd6e2396950824bdb620a68ddf321d2c37c Mon Sep 17 00:00:00 2001 From: cheatfate Date: Sat, 3 Jun 2023 02:49:28 +0300 Subject: [PATCH] Fix validator_client. --- tests/test_validator_client.nim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_validator_client.nim b/tests/test_validator_client.nim index df5f03ecf..a7876ba5e 100644 --- a/tests/test_validator_client.nim +++ b/tests/test_validator_client.nim @@ -10,6 +10,7 @@ import std/strutils import unittest2 +import chronos/unittest2/asynctests import ../beacon_chain/validator_client/common const @@ -325,14 +326,14 @@ suite "Validator Client test suite": else: err("Content-Type not supported") - proc submitBeaconCommitteeSelectionsPlain*( + proc submitBeaconCommitteeSelectionsPlain( body: seq[RestBeaconCommitteeSelection] ): RestPlainResponse {. rest, endpoint: "/eth/v1/validator/beacon_committee_selections", meth: MethodPost.} ## https://ethereum.github.io/beacon-APIs/#/Validator/submitBeaconCommitteeSelections - proc submitSyncCommitteeSelectionsPlain*( + proc submitSyncCommitteeSelectionsPlain( body: seq[RestSyncCommitteeSelection] ): RestPlainResponse {. rest, endpoint: "/eth/v1/validator/sync_committee_selections", @@ -343,7 +344,11 @@ suite "Validator Client test suite": process: HttpProcessCallback, secure: bool): HttpServerRef = let socketFlags = {ServerFlags.TcpNoDelay, ServerFlags.ReuseAddr} - res = HttpServerRef.new(address, process, socketFlags = socketFlags) + res = + try: + HttpServerRef.new(address, process, socketFlags = socketFlags) + except CatchableError as exc: + raiseAssert "Got an exception " & $exc.msg res.get() test "normalizeUri() test vectors":