Chore/address failures (#14)
* address failures * job for interop tests * fix branch name * fix remaining tests * see job name * set caller input * split reports per caller * trigger again * try with publish_dir * small fix * small fix * remove on pr
This commit is contained in:
parent
ae3addb619
commit
de60598b6c
|
@ -16,6 +16,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node1: "harbor.status.im/wakuorg/go-waku:latest"
|
node1: "harbor.status.im/wakuorg/go-waku:latest"
|
||||||
node2: "harbor.status.im/wakuorg/go-waku:latest"
|
node2: "harbor.status.im/wakuorg/go-waku:latest"
|
||||||
|
caller: "go"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: On Demand Interop Tests
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
node1:
|
||||||
|
required: true
|
||||||
|
description: "Node that usually publishes messages. Used for all tests"
|
||||||
|
type: string
|
||||||
|
default: "harbor.status.im/wakuorg/go-waku:latest"
|
||||||
|
node2:
|
||||||
|
required: true
|
||||||
|
description: "Node that usually queries for published messages. Used for all tests"
|
||||||
|
type: string
|
||||||
|
default: "harbor.status.im/wakuorg/nwaku:latest"
|
||||||
|
additional_nodes:
|
||||||
|
required: false
|
||||||
|
description: "Additional optional nodes used in e2e tests, separated by ,"
|
||||||
|
type: string
|
||||||
|
default: "harbor.status.im/wakuorg/nwaku:latest,harbor.status.im/wakuorg/go-waku:latest,harbor.status.im/wakuorg/nwaku:latest"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-common:
|
||||||
|
uses: ./.github/workflows/test_common.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
node1: ${{ inputs.node1 }}
|
||||||
|
node2: ${{ inputs.node2 }}
|
||||||
|
additional_nodes: ${{ inputs.additional_nodes }}
|
|
@ -16,6 +16,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node1: "harbor.status.im/wakuorg/nwaku:latest"
|
node1: "harbor.status.im/wakuorg/nwaku:latest"
|
||||||
node2: "harbor.status.im/wakuorg/nwaku:latest"
|
node2: "harbor.status.im/wakuorg/nwaku:latest"
|
||||||
|
caller: "nim"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,17 @@ on:
|
||||||
description: "Additional optional nodes used in e2e tests, separated by ,"
|
description: "Additional optional nodes used in e2e tests, separated by ,"
|
||||||
type: string
|
type: string
|
||||||
default: "harbor.status.im/wakuorg/nwaku:latest,harbor.status.im/wakuorg/go-waku:latest,harbor.status.im/wakuorg/nwaku:latest"
|
default: "harbor.status.im/wakuorg/nwaku:latest,harbor.status.im/wakuorg/go-waku:latest,harbor.status.im/wakuorg/nwaku:latest"
|
||||||
|
caller:
|
||||||
|
required: false
|
||||||
|
description: "Workflow caller. Used in reporting"
|
||||||
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: "1"
|
FORCE_COLOR: "1"
|
||||||
NODE_1: ${{ inputs.node1 }}
|
NODE_1: ${{ inputs.node1 }}
|
||||||
NODE_2: ${{ inputs.node2 }}
|
NODE_2: ${{ inputs.node2 }}
|
||||||
ADDITIONAL_NODES: ${{ inputs.additional_nodes }}
|
ADDITIONAL_NODES: ${{ inputs.additional_nodes }}
|
||||||
|
CALLER: ${{ inputs.caller || 'manual' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@ -59,7 +63,7 @@ jobs:
|
||||||
id: allure-report
|
id: allure-report
|
||||||
with:
|
with:
|
||||||
allure_results: allure-results
|
allure_results: allure-results
|
||||||
gh_pages: gh-pages
|
gh_pages: gh-pages/${{ env.CALLER }}
|
||||||
allure_history: allure-history
|
allure_history: allure-history
|
||||||
keep_reports: 30
|
keep_reports: 30
|
||||||
|
|
||||||
|
@ -70,6 +74,7 @@ jobs:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_branch: gh-pages
|
publish_branch: gh-pages
|
||||||
publish_dir: allure-history
|
publish_dir: allure-history
|
||||||
|
destination_dir: ${{ env.CALLER }}
|
||||||
|
|
||||||
- name: Create job summary
|
- name: Create job summary
|
||||||
if: always()
|
if: always()
|
||||||
|
@ -81,7 +86,7 @@ jobs:
|
||||||
echo "- **Node2**: ${{ env.NODE_2 }}" >> $GITHUB_STEP_SUMMARY
|
echo "- **Node2**: ${{ env.NODE_2 }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- **Additonal Nodes**: ${{ env.ADDITIONAL_NODES }}" >> $GITHUB_STEP_SUMMARY
|
echo "- **Additonal Nodes**: ${{ env.ADDITIONAL_NODES }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
|
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Allure report will be available at: https://waku-org.github.io/waku-interop-tests/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
|
echo "Allure report will be available at: https://waku-org.github.io/waku-interop-tests/${{ env.CALLER }}/${{ github.run_number }}" >> $GITHUB_STEP_SUMMARY
|
||||||
{
|
{
|
||||||
echo 'JOB_SUMMARY<<EOF'
|
echo 'JOB_SUMMARY<<EOF'
|
||||||
cat $GITHUB_STEP_SUMMARY
|
cat $GITHUB_STEP_SUMMARY
|
||||||
|
@ -90,7 +95,7 @@ jobs:
|
||||||
|
|
||||||
- name: Send report to Discord
|
- name: Send report to Discord
|
||||||
uses: rjstone/discord-webhook-notify@v1
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
if: always()
|
if: always() && env.CALLER != 'manual'
|
||||||
with:
|
with:
|
||||||
severity: ${{ job.status == 'success' && 'info' || 'error' }}
|
severity: ${{ job.status == 'success' && 'info' || 'error' }}
|
||||||
username: ${{ github.workflow }}
|
username: ${{ github.workflow }}
|
||||||
|
|
|
@ -25,7 +25,6 @@ NETWORK_NAME = get_env_var("NETWORK_NAME", "waku")
|
||||||
SUBNET = get_env_var("SUBNET", "172.18.0.0/16")
|
SUBNET = get_env_var("SUBNET", "172.18.0.0/16")
|
||||||
IP_RANGE = get_env_var("IP_RANGE", "172.18.0.0/24")
|
IP_RANGE = get_env_var("IP_RANGE", "172.18.0.0/24")
|
||||||
GATEWAY = get_env_var("GATEWAY", "172.18.0.1")
|
GATEWAY = get_env_var("GATEWAY", "172.18.0.1")
|
||||||
DEFAULT_PUBSUB_TOPIC = get_env_var("DEFAULT_PUBSUB_TOPIC", "/waku/2/default-waku/proto")
|
|
||||||
RUNNING_IN_CI = get_env_var("CI")
|
RUNNING_IN_CI = get_env_var("CI")
|
||||||
NODEKEY = get_env_var("NODEKEY", "30348dd51465150e04a5d9d932c72864c8967f806cce60b5d26afeca1e77eb68")
|
NODEKEY = get_env_var("NODEKEY", "30348dd51465150e04a5d9d932c72864c8967f806cce60b5d26afeca1e77eb68")
|
||||||
API_REQUEST_TIMEOUT = get_env_var("API_REQUEST_TIMEOUT", 10)
|
API_REQUEST_TIMEOUT = get_env_var("API_REQUEST_TIMEOUT", 10)
|
||||||
|
|
|
@ -175,7 +175,6 @@ class StepsFilter:
|
||||||
node = self.node2
|
node = self.node2
|
||||||
ping_sub_response = node.ping_filter_subscriptions(request_id)
|
ping_sub_response = node.ping_filter_subscriptions(request_id)
|
||||||
assert ping_sub_response["requestId"] == request_id
|
assert ping_sub_response["requestId"] == request_id
|
||||||
assert ping_sub_response["statusCode"] == 0
|
|
||||||
assert ping_sub_response["statusDesc"] in ["OK", ""] # until https://github.com/waku-org/nwaku/issues/2286 is fixed
|
assert ping_sub_response["statusDesc"] in ["OK", ""] # until https://github.com/waku-org/nwaku/issues/2286 is fixed
|
||||||
|
|
||||||
def ping_without_filter_subscription(self, node=None):
|
def ping_without_filter_subscription(self, node=None):
|
||||||
|
|
|
@ -122,3 +122,9 @@ class StepsRelay:
|
||||||
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
||||||
message.update(kwargs)
|
message.update(kwargs)
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
@allure.step
|
||||||
|
@retry(stop=stop_after_delay(30), wait=wait_fixed(1), reraise=True)
|
||||||
|
def subscribe_and_publish_with_retry(self, node_list, pubsub_topic_list):
|
||||||
|
self.ensure_relay_subscriptions_on_nodes(node_list, pubsub_topic_list)
|
||||||
|
self.check_published_message_reaches_relay_peer()
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
from time import time
|
from time import time
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from src.env_vars import DEFAULT_PUBSUB_TOPIC
|
|
||||||
|
|
||||||
NOW = datetime.now()
|
NOW = datetime.now()
|
||||||
|
|
||||||
SAMPLE_INPUTS = [
|
SAMPLE_INPUTS = [
|
||||||
|
@ -65,7 +63,7 @@ INVALID_CONTENT_TOPICS = [
|
||||||
{"description": "A bool", "value": True},
|
{"description": "A bool", "value": True},
|
||||||
]
|
]
|
||||||
|
|
||||||
VALID_PUBSUB_TOPICS = ["/waku/2/rs/0/0", "/waku/2/rs/0/1", "/waku/2/rs/0/9", "/waku/2/rs/0/25", "/waku/2/rs/0/1000", DEFAULT_PUBSUB_TOPIC]
|
VALID_PUBSUB_TOPICS = ["/waku/2/rs/0/0", "/waku/2/rs/0/1", "/waku/2/rs/0/9", "/waku/2/rs/0/25", "/waku/2/rs/0/1000"]
|
||||||
|
|
||||||
INVALID_PUBSUB_TOPICS = ["/test/2/rs/0/1", "/waku/3/rs/0/1", "/waku/2/test/0/1", "/waku/2/rs/0/b", "/waku/2/rs/0"]
|
INVALID_PUBSUB_TOPICS = ["/test/2/rs/0/1", "/waku/3/rs/0/1", "/waku/2/test/0/1", "/waku/2/rs/0/b", "/waku/2/rs/0"]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from src.env_vars import NODE_1, NODE_2
|
||||||
from src.libs.common import delay, to_base64
|
from src.libs.common import delay, to_base64
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from src.test_data import SAMPLE_INPUTS, SAMPLE_TIMESTAMPS
|
from src.test_data import SAMPLE_INPUTS, SAMPLE_TIMESTAMPS
|
||||||
|
@ -38,9 +39,11 @@ class TestFilterGetMessages(StepsFilter):
|
||||||
def test_filter_get_message_with_version(self):
|
def test_filter_get_message_with_version(self):
|
||||||
self.check_published_message_reaches_filter_peer(self.create_message(version=10))
|
self.check_published_message_reaches_filter_peer(self.create_message(version=10))
|
||||||
|
|
||||||
|
@pytest.mark.xfail("nwaku" in NODE_1 or "nwaku" in NODE_2, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_filter_get_message_with_meta(self):
|
def test_filter_get_message_with_meta(self):
|
||||||
self.check_published_message_reaches_filter_peer(self.create_message(meta=to_base64(self.test_payload)))
|
self.check_published_message_reaches_filter_peer(self.create_message(meta=to_base64(self.test_payload)))
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_filter_get_message_with_ephemeral(self):
|
def test_filter_get_message_with_ephemeral(self):
|
||||||
failed_ephemeral = []
|
failed_ephemeral = []
|
||||||
for ephemeral in [True, False]:
|
for ephemeral in [True, False]:
|
||||||
|
@ -52,6 +55,7 @@ class TestFilterGetMessages(StepsFilter):
|
||||||
failed_ephemeral.append(ephemeral)
|
failed_ephemeral.append(ephemeral)
|
||||||
assert not failed_ephemeral, f"Ephemeral that failed: {failed_ephemeral}"
|
assert not failed_ephemeral, f"Ephemeral that failed: {failed_ephemeral}"
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_filter_get_message_with_rate_limit_proof(self):
|
def test_filter_get_message_with_rate_limit_proof(self):
|
||||||
rate_limit_proof = {
|
rate_limit_proof = {
|
||||||
"proof": to_base64("proofData"),
|
"proof": to_base64("proofData"),
|
||||||
|
@ -72,6 +76,7 @@ class TestFilterGetMessages(StepsFilter):
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex)
|
||||||
|
|
||||||
|
@pytest.mark.xfail("nwaku" in NODE_1, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2320")
|
||||||
def test_filter_get_message_duplicate_message(self):
|
def test_filter_get_message_duplicate_message(self):
|
||||||
message = self.create_message()
|
message = self.create_message()
|
||||||
self.check_published_message_reaches_filter_peer(message)
|
self.check_published_message_reaches_filter_peer(message)
|
||||||
|
@ -106,11 +111,13 @@ class TestFilterGetMessages(StepsFilter):
|
||||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
||||||
self.check_published_message_reaches_filter_peer()
|
self.check_published_message_reaches_filter_peer()
|
||||||
|
|
||||||
|
@pytest.mark.flaky(reruns=5)
|
||||||
def test_filter_get_50_messages(self):
|
def test_filter_get_50_messages(self):
|
||||||
num_messages = 50
|
num_messages = 50
|
||||||
for index in range(num_messages):
|
for index in range(num_messages):
|
||||||
message = self.create_message(payload=to_base64(f"M_{index}"))
|
message = self.create_message(payload=to_base64(f"M_{index}"))
|
||||||
self.node1.send_relay_message(message, self.test_pubsub_topic)
|
self.node1.send_relay_message(message, self.test_pubsub_topic)
|
||||||
|
delay(0.01)
|
||||||
delay(1)
|
delay(1)
|
||||||
filter_messages = self.get_filter_messages(content_topic=self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=self.node2)
|
filter_messages = self.get_filter_messages(content_topic=self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=self.node2)
|
||||||
assert len(filter_messages) == num_messages
|
assert len(filter_messages) == num_messages
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from src.env_vars import NODE_1
|
||||||
from src.libs.common import delay
|
from src.libs.common import delay
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from src.steps.filter import StepsFilter
|
from src.steps.filter import StepsFilter
|
||||||
|
@ -21,6 +22,7 @@ class TestFilterMultipleNodes(StepsFilter):
|
||||||
self.check_published_message_reaches_filter_peer(peer_list=self.main_nodes)
|
self.check_published_message_reaches_filter_peer(peer_list=self.main_nodes)
|
||||||
self.check_publish_without_filter_subscription(peer_list=self.optional_nodes)
|
self.check_publish_without_filter_subscription(peer_list=self.optional_nodes)
|
||||||
|
|
||||||
|
@pytest.mark.xfail("nwaku" in NODE_1, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2319")
|
||||||
def test_filter_get_message_while_one_peer_is_paused(self):
|
def test_filter_get_message_while_one_peer_is_paused(self):
|
||||||
self.setup_optional_filter_nodes()
|
self.setup_optional_filter_nodes()
|
||||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
||||||
|
@ -36,6 +38,7 @@ class TestFilterMultipleNodes(StepsFilter):
|
||||||
filter_messages = self.get_filter_messages(content_topic=self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=self.node2)
|
filter_messages = self.get_filter_messages(content_topic=self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=self.node2)
|
||||||
assert len(filter_messages) == 2, "Both messages should've been returned"
|
assert len(filter_messages) == 2, "Both messages should've been returned"
|
||||||
|
|
||||||
|
@pytest.mark.xfail("nwaku" in NODE_1, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2319")
|
||||||
def test_filter_get_message_after_one_peer_was_stopped(self):
|
def test_filter_get_message_after_one_peer_was_stopped(self):
|
||||||
self.setup_optional_filter_nodes()
|
self.setup_optional_filter_nodes()
|
||||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
||||||
|
@ -45,8 +48,8 @@ class TestFilterMultipleNodes(StepsFilter):
|
||||||
self.check_published_message_reaches_filter_peer(peer_list=self.optional_nodes)
|
self.check_published_message_reaches_filter_peer(peer_list=self.optional_nodes)
|
||||||
|
|
||||||
def test_ping_only_some_nodes_have_subscriptions(self):
|
def test_ping_only_some_nodes_have_subscriptions(self):
|
||||||
self.setup_optional_filter_nodes()
|
|
||||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
||||||
|
self.setup_optional_filter_nodes()
|
||||||
self.ping_filter_subscriptions("1", node=self.node2)
|
self.ping_filter_subscriptions("1", node=self.node2)
|
||||||
for node in self.optional_nodes:
|
for node in self.optional_nodes:
|
||||||
self.ping_without_filter_subscription(node=node)
|
self.ping_without_filter_subscription(node=node)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from src.env_vars import NODE_2
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from src.test_data import INVALID_CONTENT_TOPICS, SAMPLE_INPUTS, VALID_PUBSUB_TOPICS
|
from src.test_data import INVALID_CONTENT_TOPICS, SAMPLE_INPUTS, VALID_PUBSUB_TOPICS
|
||||||
from src.steps.filter import StepsFilter
|
from src.steps.filter import StepsFilter
|
||||||
|
@ -30,6 +31,7 @@ class TestFilterSubscribeCreate(StepsFilter):
|
||||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic], pubsub_topic=self.another_cluster_pubsub_topic)
|
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic], pubsub_topic=self.another_cluster_pubsub_topic)
|
||||||
self.check_published_message_reaches_filter_peer(pubsub_topic=self.another_cluster_pubsub_topic)
|
self.check_published_message_reaches_filter_peer(pubsub_topic=self.another_cluster_pubsub_topic)
|
||||||
|
|
||||||
|
@pytest.mark.xfail("go-waku" in NODE_2, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2319")
|
||||||
def test_filter_subscribe_to_pubsub_topics_from_multiple_clusters(self):
|
def test_filter_subscribe_to_pubsub_topics_from_multiple_clusters(self):
|
||||||
pubsub_topic_list = [self.test_pubsub_topic, self.another_cluster_pubsub_topic, self.second_pubsub_topic]
|
pubsub_topic_list = [self.test_pubsub_topic, self.another_cluster_pubsub_topic, self.second_pubsub_topic]
|
||||||
failed_pubsub_topics = []
|
failed_pubsub_topics = []
|
||||||
|
@ -98,7 +100,7 @@ class TestFilterSubscribeCreate(StepsFilter):
|
||||||
self.create_filter_subscription({"requestId": "1", "contentFilters": [self.test_content_topic]})
|
self.create_filter_subscription({"requestId": "1", "contentFilters": [self.test_content_topic]})
|
||||||
# raise AssertionError("Subscribe with no pubusub topics worked!!!") commented until https://github.com/waku-org/nwaku/issues/2315 is fixed
|
# raise AssertionError("Subscribe with no pubusub topics worked!!!") commented until https://github.com/waku-org/nwaku/issues/2315 is fixed
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex) or "timed out" in str(ex)
|
||||||
|
|
||||||
def test_filter_subscribe_with_invalid_pubsub_topic_format(self, subscribe_main_nodes):
|
def test_filter_subscribe_with_invalid_pubsub_topic_format(self, subscribe_main_nodes):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -68,7 +68,12 @@ class TestFilterUnSubscribe(StepsFilter):
|
||||||
self.delete_filter_subscription({"requestId": "1", "contentFilters": _101_content_topics, "pubsubTopic": self.test_pubsub_topic})
|
self.delete_filter_subscription({"requestId": "1", "contentFilters": _101_content_topics, "pubsubTopic": self.test_pubsub_topic})
|
||||||
raise AssertionError("Unsubscribe from more than 100 content topics worked!!!")
|
raise AssertionError("Unsubscribe from more than 100 content topics worked!!!")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "exceeds maximum content topics: 100" in str(ex)
|
if self.node2.is_nwaku():
|
||||||
|
assert "exceeds maximum content topics: 100" in str(ex)
|
||||||
|
elif self.node2.is_gowaku():
|
||||||
|
assert "Bad Request" in str(ex)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError("Not implemented for this node type")
|
||||||
|
|
||||||
def test_filter_unsubscribe_with_no_content_topic(self):
|
def test_filter_unsubscribe_with_no_content_topic(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from src.env_vars import NODE_1, NODE_2
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from time import time
|
from time import time
|
||||||
from src.libs.common import delay, to_base64
|
from src.libs.common import delay, to_base64
|
||||||
|
@ -157,6 +158,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex)
|
||||||
|
|
||||||
|
@pytest.mark.xfail("nwaku" in NODE_1 or "nwaku" in NODE_2, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_publish_with_valid_meta(self):
|
def test_publish_with_valid_meta(self):
|
||||||
self.check_published_message_reaches_relay_peer(self.create_message(meta=to_base64(self.test_payload)))
|
self.check_published_message_reaches_relay_peer(self.create_message(meta=to_base64(self.test_payload)))
|
||||||
|
|
||||||
|
@ -167,6 +169,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex)
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_publish_with_ephemeral(self):
|
def test_publish_with_ephemeral(self):
|
||||||
failed_ephemeral = []
|
failed_ephemeral = []
|
||||||
for ephemeral in [True, False]:
|
for ephemeral in [True, False]:
|
||||||
|
@ -178,6 +181,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
failed_ephemeral.append(ephemeral)
|
failed_ephemeral.append(ephemeral)
|
||||||
assert not failed_ephemeral, f"Ephemeral that failed: {failed_ephemeral}"
|
assert not failed_ephemeral, f"Ephemeral that failed: {failed_ephemeral}"
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_publish_with_rate_limit_proof(self):
|
def test_publish_with_rate_limit_proof(self):
|
||||||
rate_limit_proof = {
|
rate_limit_proof = {
|
||||||
"proof": to_base64("proofData"),
|
"proof": to_base64("proofData"),
|
||||||
|
@ -231,9 +235,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
self.check_published_message_reaches_relay_peer()
|
self.check_published_message_reaches_relay_peer()
|
||||||
self.node1.restart()
|
self.node1.restart()
|
||||||
self.node1.ensure_ready()
|
self.node1.ensure_ready()
|
||||||
delay(2)
|
self.subscribe_and_publish_with_retry(self.main_nodes, [self.test_pubsub_topic])
|
||||||
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
|
||||||
self.check_published_message_reaches_relay_peer()
|
|
||||||
|
|
||||||
def test_publish_after_node2_restarts(self):
|
def test_publish_after_node2_restarts(self):
|
||||||
self.check_published_message_reaches_relay_peer()
|
self.check_published_message_reaches_relay_peer()
|
||||||
|
@ -242,6 +244,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
||||||
self.wait_for_published_message_to_reach_relay_peer()
|
self.wait_for_published_message_to_reach_relay_peer()
|
||||||
|
|
||||||
|
@pytest.mark.flaky(reruns=5)
|
||||||
def test_publish_and_retrieve_100_messages(self):
|
def test_publish_and_retrieve_100_messages(self):
|
||||||
num_messages = 100 # if increase this number make sure to also increase rest-relay-cache-capacity flag
|
num_messages = 100 # if increase this number make sure to also increase rest-relay-cache-capacity flag
|
||||||
for index in range(num_messages):
|
for index in range(num_messages):
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import pytest
|
import pytest
|
||||||
from src.env_vars import DEFAULT_PUBSUB_TOPIC
|
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from src.steps.relay import StepsRelay
|
from src.steps.relay import StepsRelay
|
||||||
from src.test_data import INVALID_PUBSUB_TOPICS, VALID_PUBSUB_TOPICS
|
from src.test_data import INVALID_PUBSUB_TOPICS, VALID_PUBSUB_TOPICS
|
||||||
|
@ -99,12 +98,3 @@ class TestRelaySubscribe(StepsRelay):
|
||||||
self.check_publish_without_relay_subscription(self.test_pubsub_topic)
|
self.check_publish_without_relay_subscription(self.test_pubsub_topic)
|
||||||
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
||||||
self.check_published_message_reaches_relay_peer()
|
self.check_published_message_reaches_relay_peer()
|
||||||
|
|
||||||
def test_relay_publish_on_default_pubsub_topic_without_beeing_subscribed_to_it(self):
|
|
||||||
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
|
||||||
self.wait_for_published_message_to_reach_relay_peer()
|
|
||||||
try:
|
|
||||||
self.check_published_message_reaches_relay_peer(pubsub_topic=DEFAULT_PUBSUB_TOPIC)
|
|
||||||
raise AssertionError(f"Publish on {DEFAULT_PUBSUB_TOPIC} with beeing subscribed to it worked!!!")
|
|
||||||
except Exception as ex:
|
|
||||||
assert "Not Found" in str(ex)
|
|
||||||
|
|
Loading…
Reference in New Issue