logos-messaging-interop-tests/tests/store/test_running_nodes.py
AYAHASSAN287 013c6e8bb0
smoke_tests (#90)
* Selecting initial smoke tests set

* adding mark "smoke" in pytest.ini

* adding mark smoke to workflow file

* Remove allure reporting from yml file

* Adding more smoke tests

* Add PR image to new nwaku workflow

* change nwaku_daily.yml to test the PR job changes

* remove dependencies from yml file

* Remove secrets check from container yml file

* remove secrets from all files

* change image tag

* revert image tag

* Revert nwaku_daily.yml to origin

* Adding PR number to choose image

* adding docker-build-image to yml file

* adding docker-image-build dependencies

* Adding quay user & password

* Adding quay username & password

* Fix yml build

* Remove changes causing errors

* remove tests part to speedup the job

* add flag workflow_call: for reusable workflow

* checkout on branch instead of master

* trying to fetch from branch

* Check out specific branch

* make node1 input

* Adding node1 as input

* Add type to required input

* fix node input format

* change input node1 format

* Delete .github/workflows/container-image.yml

* Delete .github/workflows/nim_nwaku_pr.yml

* Create 2  files for PR tests

* revert original yml files

* Fix review points on PR

* fix review points

* revert test_common file to master

* revert nim_waku_daily to master

* Fix review points
2024-12-12 11:03:42 +02:00

78 lines
4.0 KiB
Python

import pytest
from src.env_vars import NODE_2
from src.steps.store import StepsStore
class TestRunningNodes(StepsStore):
def test_main_node_relay_and_store__peer_relay_and_store(self):
self.setup_first_publishing_node(store="true", relay="true")
self.setup_first_store_node(store="true", relay="true")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")
def test_main_node_relay_and_store__peer_only_store(self):
self.setup_first_publishing_node(store="true", relay="true")
self.setup_first_store_node(store="true", relay="false")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_store_returns_empty_response()
def test_main_node_relay_and_store__peer_only_relay(self):
self.setup_first_publishing_node(store="true", relay="true")
self.setup_first_store_node(store="false", relay="true")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")
def test_main_node_relay_and_store__peer_neither_relay_nor_store(self):
self.setup_first_publishing_node(store="true", relay="true")
self.setup_first_store_node(store="false", relay="false")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")
@pytest.mark.skipif("go-waku" in NODE_2, reason="Not supported. See: https://github.com/waku-org/go-waku/issues/1106")
def test_main_node_only_relay__peer_relay_and_store(self):
self.setup_first_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="true", relay="true")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")
@pytest.mark.skipif("go-waku" in NODE_2, reason="Not supported. See: https://github.com/waku-org/go-waku/issues/1106")
def test_main_node_only_relay__peer_only_store(self):
self.setup_first_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="true", relay="false")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_store_returns_empty_response()
@pytest.mark.skipif("go-waku" in NODE_2, reason="Not supported. See: https://github.com/waku-org/go-waku/issues/1106")
def test_main_node_only_relay__peer_only_relay(self):
self.setup_first_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="false", relay="true")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
try:
self.check_published_message_is_stored(page_size=5, ascending="true")
except Exception as ex:
assert "failed to negotiate protocol: protocols not supported" in str(ex) or "PEER_DIAL_FAILURE" in str(ex)
@pytest.mark.smoke
def test_store_lightpushed_message(self):
self.setup_first_publishing_node(store="true", relay="true", lightpush="true")
self.setup_second_publishing_node(store="false", relay="true")
self.setup_first_store_node(store="false", relay="false", lightpush="true", lightpushnode=self.multiaddr_list[0])
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message(via="lightpush", sender=self.store_node1)
self.check_published_message_is_stored(page_size=5, ascending="true")
@pytest.mark.smoke
def test_store_with_filter(self):
self.setup_first_publishing_node(store="true", relay="true", filter="true")
self.setup_first_store_node(store="false", relay="false", filter="true")
self.subscribe_to_pubsub_topics_via_relay()
self.publish_message()
self.check_published_message_is_stored(page_size=5, ascending="true")