diff --git a/src/feditest/__init__.py b/src/feditest/__init__.py index eec2f1f..1a708f0 100644 --- a/src/feditest/__init__.py +++ b/src/feditest/__init__.py @@ -226,8 +226,8 @@ def load_default_node_drivers() -> None: 'feditest.nodedrivers.sandbox.SandboxMultClientDriver_ImplementationA', 'feditest.nodedrivers.sandbox.SandboxMultServerDriver_Implementation1', 'feditest.nodedrivers.sandbox.SandboxMultServerDriver_Implementation2Faulty', - 'feditest.nodedrivers.wordpress.WordPressPlusActivityPubPluginSaasNodeDriver', - 'feditest.nodedrivers.wordpress.ubos.WordPressPlusActivityPubPluginUbosNodeDriver']: + 'feditest.nodedrivers.wordpress.WordPressPlusPluginsSaasNodeDriver', + 'feditest.nodedrivers.wordpress.ubos.WordPressPlusPluginsUbosNodeDriver']: module_name, class_name = d.rsplit('.', 1) if class_name not in all_node_drivers: diff --git a/src/feditest/cli/commands/run.py b/src/feditest/cli/commands/run.py index af5d2fd..f013068 100644 --- a/src/feditest/cli/commands/run.py +++ b/src/feditest/cli/commands/run.py @@ -53,6 +53,7 @@ def run(parser: ArgumentParser, args: Namespace, remaining: list[str]) -> int: if not plan: fatal('Cannot find or create test plan ') + return 1 # make linter happy if not plan.is_compatible_type(): warning(f'Test plan has unexpected type { plan.type }: incompatibilities may occur.') diff --git a/src/feditest/nodedrivers/wordpress/__init__.py b/src/feditest/nodedrivers/wordpress/__init__.py index ed0c274..2791f74 100644 --- a/src/feditest/nodedrivers/wordpress/__init__.py +++ b/src/feditest/nodedrivers/wordpress/__init__.py @@ -134,7 +134,7 @@ def _ensure_oauth_token(self, oauth_client_id: str) -> None: """ if self._oauth_token: return - real_node = cast(WordPressPlusActivityPubPluginNode, self._node) + real_node = cast(WordPressPlusPluginsNode, self._node) self._oauth_token = real_node._provision_oauth_token_for(self, oauth_client_id) @@ -164,7 +164,7 @@ def actor_uri(self): return f'https://{ self.node.hostname }/users/{ self.userid }' -class WordPressPlusActivityPubPluginNode(NodeWithMastodonAPI): +class WordPressPlusPluginsNode(NodeWithMastodonAPI): """ A Node running WordPress with the ActivityPub plugin. """ @@ -245,4 +245,4 @@ def create_configuration_account_manager(self, rolename: str, test_plan_node: Te # Python 3.12 @override def _provision_node(self, rolename: str, config: NodeConfiguration, account_manager: AccountManager | None) -> FediverseNode: - return WordPressPlusActivityPubPluginNode(rolename, config, cast(AccountManager, account_manager)) + return WordPressPlusPluginsNode(rolename, config, cast(AccountManager, account_manager)) diff --git a/src/feditest/nodedrivers/wordpress/ubos.py b/src/feditest/nodedrivers/wordpress/ubos.py index f0b8bc9..5f9f3d8 100644 --- a/src/feditest/nodedrivers/wordpress/ubos.py +++ b/src/feditest/nodedrivers/wordpress/ubos.py @@ -13,7 +13,7 @@ USERID_NON_EXISTING_ACCOUNT_FIELD, WordPressAccount, WordPressNonExistingAccount, - WordPressPlusActivityPubPluginNode + WordPressPlusPluginsNode ) from feditest.protocols import ( Account, @@ -47,7 +47,7 @@ def set_node(self, node: Node) -> None: self._accounts_not_allocated_to_role.append(admin_account) -class WordPressPlusActivityPubPluginUbosNode(WordPressPlusActivityPubPluginNode): +class WordPressPlusPluginsUbosNode(WordPressPlusPluginsNode): """ A WordPress + ActivityPubPlugin Node running on UBOS. This means we know how to interact with it exactly. """ @@ -63,14 +63,14 @@ def provision_non_existing_account_for_role(self, role: str | None = None) -> No def add_cert_to_trust_store(self, root_cert: str) -> None: config = cast(UbosNodeConfiguration, self.config) - node_driver = cast(WordPressPlusActivityPubPluginUbosNodeDriver, self.node_driver) + node_driver = cast(WordPressPlusPluginsUbosNodeDriver, self.node_driver) node_driver.add_cert_to_trust_store_via(root_cert, config.rshcmd) def remove_cert_from_trust_store(self, root_cert: str) -> None: config = cast(UbosNodeConfiguration, self.config) - node_driver = cast(WordPressPlusActivityPubPluginUbosNodeDriver, self.node_driver) + node_driver = cast(WordPressPlusPluginsUbosNodeDriver, self.node_driver) node_driver.remove_cert_from_trust_store_via(root_cert, config.rshcmd) @@ -85,7 +85,7 @@ def _provision_oauth_token_for(self, account: WordPressAccount, oauth_client_id: trace(f'Provisioning OAuth token on {self} for user with name="{ account.userid }".') config = cast(UbosNodeConfiguration, self.config) - node_driver = cast(WordPressPlusActivityPubPluginUbosNodeDriver, self.node_driver) + node_driver = cast(WordPressPlusPluginsUbosNodeDriver, self.node_driver) token = os.urandom(16).hex() php_script = f""" @@ -107,7 +107,7 @@ def _provision_oauth_token_for(self, account: WordPressAccount, oauth_client_id: return token -class WordPressPlusActivityPubPluginUbosNodeDriver(UbosNodeDriver): +class WordPressPlusPluginsUbosNodeDriver(UbosNodeDriver): """ Knows how to instantiate Mastodon via UBOS. """ @@ -170,4 +170,4 @@ def create_configuration_account_manager(self, rolename: str, test_plan_node: Te # Python 3.12 @override def _instantiate_ubos_node(self, rolename: str, config: UbosNodeConfiguration, account_manager: AccountManager) -> Node: - return WordPressPlusActivityPubPluginUbosNode(rolename, config, account_manager) + return WordPressPlusPluginsUbosNode(rolename, config, account_manager) diff --git a/tests.smoke/wordpress.saas.constellation.json b/tests.smoke/wordpress.saas.constellation.json index c5381ea..c205ab1 100644 --- a/tests.smoke/wordpress.saas.constellation.json +++ b/tests.smoke/wordpress.saas.constellation.json @@ -1,7 +1,7 @@ { "roles": { "server": { - "nodedriver": "WordPressPlusActivityPubPluginSaasNodeDriver", + "nodedriver": "WordPressPlusPluginsSaasNodeDriver", "parameters": { "hostname" : "testing.feditest.org", "verify_api_tls_certificate" : false diff --git a/tests.smoke/wordpress.ubos.constellation.json b/tests.smoke/wordpress.ubos.constellation.json index b916578..96fd2cf 100644 --- a/tests.smoke/wordpress.ubos.constellation.json +++ b/tests.smoke/wordpress.ubos.constellation.json @@ -1,7 +1,7 @@ { "roles": { "server": { - "nodedriver": "WordPressPlusActivityPubPluginUbosNodeDriver" + "nodedriver": "WordPressPlusPluginsUbosNodeDriver" } }, "name": null diff --git a/tests.smoke/wordpress_mastodon.ubos.constellation.json b/tests.smoke/wordpress_mastodon.ubos.constellation.json index 1442d1a..65ca1b9 100644 --- a/tests.smoke/wordpress_mastodon.ubos.constellation.json +++ b/tests.smoke/wordpress_mastodon.ubos.constellation.json @@ -1,7 +1,7 @@ { "roles": { "leader_node": { - "nodedriver": "WordPressPlusActivityPubPluginUbosNodeDriver" + "nodedriver": "WordPressPlusPluginsUbosNodeDriver" }, "follower_node": { "nodedriver": "MastodonUbosNodeDriver"