Skip to content

Commit

Permalink
limit relayer types
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Apr 28, 2023
1 parent 09ee03d commit 75631b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion integration_tests/ibc_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os
import subprocess
from enum import IntEnum
from pathlib import Path
from typing import NamedTuple

Expand All @@ -20,7 +21,18 @@ class IBCNetwork(NamedTuple):
proc: subprocess.Popen[bytes] | None


def prepare_network(tmp_path, file, incentivized=True, is_relay=True, is_hermes=True):
class Relayer(IntEnum):
(HERMES, RLY) = range(2)


def prepare_network(
tmp_path,
file,
incentivized=True,
is_relay=True,
relayer=Relayer.HERMES,
):
is_hermes = relayer == Relayer.HERMES
file = f"configs/{file}.jsonnet"
gen = setup_custom_cronos(tmp_path, 26700, Path(__file__).parent / file)
cronos = next(gen)
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/test_ibc_rly.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from .ibc_utils import RATIO, get_balance, prepare_network, rly_transfer
from .ibc_utils import RATIO, Relayer, get_balance, prepare_network, rly_transfer
from .utils import ADDRS, eth_to_bech32, wait_for_fn


Expand All @@ -14,7 +14,7 @@ def ibc(request, tmp_path_factory):
path = tmp_path_factory.mktemp(name)
procs = []
try:
for network in prepare_network(path, name, True, True, False):
for network in prepare_network(path, name, True, True, Relayer.RLY):
if network.proc:
procs.append(network.proc)
yield network
Expand Down

0 comments on commit 75631b9

Please sign in to comment.