fix: re-arrange skip conditions

This commit is contained in:
Roman 2024-05-06 17:44:13 +08:00
parent 1423e539e4
commit 78043022fe
No known key found for this signature in database
GPG Key ID: B8FE070B54E11B75

View File

@ -13,10 +13,10 @@ from src.test_data import SAMPLE_INPUTS
logger = get_custom_logger(__name__)
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.usefixtures("register_main_rln_relay_nodes")
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2 + ADDITIONAL_NODES), reason="Test works only with nwaku")
@pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
class TestRelayRLN(StepsRLN, StepsRelay):
@pytest.mark.xdist_group(name="RLN serial tests")
def test_valid_payloads_at_slow_rate(self):
self.setup_main_rln_relay_nodes()
self.subscribe_main_relay_nodes()
@ -32,7 +32,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
delay(1)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.xdist_group(name="RLN serial tests")
def test_valid_payloads_at_spam_rate(self):
self.setup_main_rln_relay_nodes()
self.subscribe_main_relay_nodes()
@ -51,7 +50,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" in str(e)
@pytest.mark.xdist_group(name="RLN serial tests")
def test_valid_payload_at_variable_rate(self):
self.setup_main_rln_relay_nodes()
self.subscribe_main_relay_nodes()
@ -74,7 +72,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" in str(e)
@pytest.mark.xdist_group(name="RLN serial tests")
def test_valid_payloads_random_epoch_at_slow_rate(self):
epoch_sec = random.randint(2, 5)
self.setup_main_rln_relay_nodes(rln_relay_epoch_sec=epoch_sec)
@ -91,7 +88,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
delay(epoch_sec)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skip(reason="waiting for RLN v2 implementation")
def test_valid_payloads_random_user_message_limit(self):
user_message_limit = random.randint(2, 4)
@ -108,7 +104,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
failed_payloads.append(payload["description"])
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skip(reason="exceeding timeout, waiting for https://github.com/waku-org/nwaku/pull/2612 to be part of the release")
@pytest.mark.timeout(600)
def test_valid_payloads_dynamic_at_slow_rate(self):
@ -126,7 +121,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
delay(1)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skip(reason="exceeding timeout, waiting for https://github.com/waku-org/nwaku/pull/2612 to be part of the release")
@pytest.mark.timeout(600)
def test_valid_payloads_dynamic_at_spam_rate(self):
@ -146,7 +140,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" in str(e)
@pytest.mark.xdist_group(name="RLN serial tests")
def test_valid_payloads_n1_with_rln_n2_without_rln_at_spam_rate(self):
self.setup_first_rln_relay_node()
self.setup_second_relay_node()
@ -165,7 +158,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" in str(e)
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skip(reason="Epoch settings aren't compatible across nodes")
def test_valid_payloads_mixed_epoch_at_slow_rate(self):
n1_epoch_sec = 5
@ -185,7 +177,6 @@ class TestRelayRLN(StepsRLN, StepsRelay):
delay(n1_epoch_sec)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skip(reason="waiting for NWAKU lightpush + RLN node implementation")
def test_valid_payloads_lightpush_at_spam_rate(self):
self.setup_first_rln_relay_node(lightpush="true")
@ -205,7 +196,7 @@ class TestRelayRLN(StepsRLN, StepsRelay):
except Exception as e:
assert "RLN validation failed" in str(e)
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skipif("go-waku" in ADDITIONAL_NODES, reason="Test works only with nwaku")
@pytest.mark.usefixtures("register_main_rln_relay_nodes", "register_optional_rln_relay_nodes")
def test_valid_payloads_with_optional_nodes_at_slow_rate(self):
self.setup_main_rln_relay_nodes()
@ -224,7 +215,7 @@ class TestRelayRLN(StepsRLN, StepsRelay):
delay(1)
assert not failed_payloads, f"Payloads failed: {failed_payloads}"
@pytest.mark.xdist_group(name="RLN serial tests")
@pytest.mark.skipif("go-waku" in ADDITIONAL_NODES, reason="Test works only with nwaku")
@pytest.mark.usefixtures("register_main_rln_relay_nodes", "register_optional_rln_relay_nodes")
def test_valid_payloads_with_optional_nodes_at_spam_rate(self):
self.setup_main_rln_relay_nodes()