fix skipif mark

This commit is contained in:
aya 2024-12-15 14:40:20 +02:00
parent d97fb2f91c
commit 0b5c113b82

View File

@ -14,7 +14,7 @@ logger = get_custom_logger(__name__)
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skip("nwaku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
@pytest.mark.skipif("nwaku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
class TestRelayRLN(StepsRLN, StepsRelay):
SAMPLE_INPUTS_RLN = SAMPLE_INPUTS + SAMPLE_INPUTS + SAMPLE_INPUTS
@ -38,7 +38,7 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" or "NonceLimitReached" in str(e)
@pytest.mark.skip("nwaku" in (NODE_1 + NODE_2))
@pytest.mark.skipif("nwaku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_valid_payloads_at_slow_rate(self, pytestconfig):
message_limit = 20
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
@ -59,7 +59,7 @@ class TestRelayRLN(StepsRLN, StepsRelay):
if i == message_limit - 1:
break
@pytest.mark.skip("nwaku" in (NODE_1 + NODE_2))
@pytest.mark.skipif("nwaku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_valid_payloads_at_spam_rate(self, pytestconfig):
message_limit = 20
epoch_sec = 600
@ -79,7 +79,7 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" or "NonceLimitReached" in str(e)
@pytest.mark.skip("nwaku" in (NODE_1 + NODE_2))
@pytest.mark.skipif("nwaku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
def test_valid_payload_at_variable_rate(self, pytestconfig):
self.register_rln_relay_nodes(0, pytestconfig.cache.get("keystore-prefixes", []))
self.setup_main_rln_relay_nodes(rln_relay_user_message_limit=1, rln_relay_epoch_sec=1)