mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-01-07 00:13:06 +00:00
adjustments after CI runs
This commit is contained in:
parent
ffbe8d8fa1
commit
bad29a514a
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -16,17 +16,17 @@ on:
|
||||
required: true
|
||||
description: "Node that usually publishes messages. Used for all tests"
|
||||
type: string
|
||||
default: "harbor.status.im/wakuorg/nwaku:latest"
|
||||
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/go-waku:latest"
|
||||
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"
|
||||
default: "harbor.status.im/wakuorg/nwaku:latest,harbor.status.im/wakuorg/go-waku:latest,harbor.status.im/wakuorg/nwaku:latest"
|
||||
protocol:
|
||||
description: "Protocol used to comunicate inside the network"
|
||||
required: true
|
||||
|
||||
@ -16,9 +16,9 @@ def get_env_var(var_name, default=None):
|
||||
# Configuration constants. Need to be upercase to appear in reports
|
||||
DEFAULT_NWAKU = "harbor.status.im/wakuorg/nwaku:latest"
|
||||
DEFAULT_GOWAKU = "harbor.status.im/wakuorg/go-waku:latest"
|
||||
NODE_1 = get_env_var("NODE_1", DEFAULT_NWAKU)
|
||||
NODE_2 = get_env_var("NODE_2", DEFAULT_GOWAKU)
|
||||
ADDITIONAL_NODES = get_env_var("ADDITIONAL_NODES", f"{DEFAULT_NWAKU},{DEFAULT_GOWAKU}")
|
||||
NODE_1 = get_env_var("NODE_1", DEFAULT_GOWAKU)
|
||||
NODE_2 = get_env_var("NODE_2", DEFAULT_NWAKU)
|
||||
ADDITIONAL_NODES = get_env_var("ADDITIONAL_NODES", f"{DEFAULT_NWAKU},{DEFAULT_GOWAKU},{DEFAULT_NWAKU}")
|
||||
# more nodes need to follow the NODE_X pattern
|
||||
DOCKER_LOG_DIR = get_env_var("DOCKER_LOG_DIR", "./log/docker")
|
||||
NETWORK_NAME = get_env_var("NETWORK_NAME", "waku")
|
||||
@ -29,4 +29,4 @@ DEFAULT_PUBSUB_TOPIC = get_env_var("DEFAULT_PUBSUB_TOPIC", "/waku/2/default-waku
|
||||
PROTOCOL = get_env_var("PROTOCOL", "REST")
|
||||
RUNNING_IN_CI = get_env_var("CI")
|
||||
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", 20)
|
||||
|
||||
@ -8,7 +8,7 @@ logger = get_custom_logger(__name__)
|
||||
|
||||
class BaseClient(ABC):
|
||||
def make_request(self, method, url, headers=None, data=None):
|
||||
logger.debug(f"{method.upper()} call: {url} with payload: {data}")
|
||||
logger.info(f"{method.upper()} call: {url} with payload: {data}")
|
||||
response = requests.request(method.upper(), url, headers=headers, data=data, timeout=API_REQUEST_TIMEOUT)
|
||||
try:
|
||||
response.raise_for_status()
|
||||
|
||||
@ -118,6 +118,8 @@ class StepsFilter:
|
||||
assert filter_sub_response["requestId"] == request_id
|
||||
assert filter_sub_response["statusDesc"] in ["OK", ""] # until https://github.com/waku-org/nwaku/issues/2286 is fixed
|
||||
|
||||
@retry(stop=stop_after_delay(30), wait=wait_fixed(1), reraise=True)
|
||||
@allure.step
|
||||
def subscribe_optional_filter_nodes(self, content_topic_list, pubsub_topic=None):
|
||||
if pubsub_topic is None:
|
||||
pubsub_topic = self.test_pubsub_topic
|
||||
|
||||
@ -7,7 +7,7 @@ logger = get_custom_logger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("setup_main_relay_node", "setup_main_filter_node")
|
||||
class TestFilterSubscribeUpdate(StepsFilter):
|
||||
class TestFilterSubscribeCreate(StepsFilter):
|
||||
def test_filter_subscribe_to_single_topics(self):
|
||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
||||
self.check_published_message_reaches_filter_peer()
|
||||
|
||||
@ -7,7 +7,7 @@ logger = get_custom_logger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("setup_main_relay_node", "setup_main_filter_node")
|
||||
class TestFilterSubscribeCreate(StepsFilter):
|
||||
class TestFilterSubscribeUpdate(StepsFilter):
|
||||
def test_filter_update_subscription_add_a_new_content_topic(self):
|
||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic], pubsub_topic=self.test_pubsub_topic)
|
||||
self.update_filter_subscription({"requestId": "1", "contentFilters": [self.second_content_topic], "pubsubTopic": self.test_pubsub_topic})
|
||||
@ -62,7 +62,7 @@ class TestFilterSubscribeCreate(StepsFilter):
|
||||
|
||||
def test_filter_update_subscription_with_no_pubsub_topic(self, subscribe_main_nodes):
|
||||
try:
|
||||
self.update_filter_subscription({"requestId": "1", "contentFilters": [self.test_content_topic]})
|
||||
self.update_filter_subscription({"requestId": "1", "contentFilters": [self.second_content_topic]})
|
||||
raise AssertionError("Subscribe with no pubusub topics worked!!!")
|
||||
except Exception as ex:
|
||||
assert "Bad Request" in str(ex)
|
||||
|
||||
@ -38,9 +38,13 @@ class TestFilterUnSubscribe(StepsFilter):
|
||||
self.check_publish_without_filter_subscription(self.create_message(contentTopic=self.second_content_topic), self.second_pubsub_topic)
|
||||
|
||||
def test_filter_unsubscribe_from_non_existing_content_topic(self):
|
||||
self.delete_filter_subscription(
|
||||
{"requestId": "1", "contentFilters": [self.second_content_topic], "pubsubTopic": self.test_pubsub_topic}, status="can't unsubscribe"
|
||||
)
|
||||
try:
|
||||
self.delete_filter_subscription(
|
||||
{"requestId": "1", "contentFilters": [self.second_content_topic], "pubsubTopic": self.test_pubsub_topic},
|
||||
status="can't unsubscribe" if self.node2.is_gowaku() else "",
|
||||
)
|
||||
except Exception as ex:
|
||||
assert "Not Found" and "peer has no subscriptions" in str(ex)
|
||||
self.check_published_message_reaches_filter_peer()
|
||||
|
||||
def test_filter_unsubscribe_from_non_existing_pubsub_topic(self):
|
||||
|
||||
@ -57,7 +57,7 @@ class TestRelayPublish(StepsRelay):
|
||||
self.check_published_message_reaches_relay_peer(message, message_propagation_delay=2)
|
||||
raise AssertionError("Message with payload > 1MB was received")
|
||||
except Exception as ex:
|
||||
assert "couldn't find any messages" in str(ex) or "Bad Request" in str(ex)
|
||||
assert "couldn't find any messages" in str(ex) or "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
||||
|
||||
def test_publish_with_valid_content_topics(self):
|
||||
failed_content_topics = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user