From d020e0189262195aa8a086c6a88f52600354a325 Mon Sep 17 00:00:00 2001 From: dweinholz Date: Thu, 25 Jan 2024 09:28:03 +0100 Subject: [PATCH] updated unitetest --- simple_vm_client/bibigrid_connector/bibigrid_connector.py | 2 +- .../bibigrid_connector/test_bibigrid_connector.py | 3 ++- simple_vm_client/forc_connector/test_forc_connector.py | 3 --- simple_vm_client/test_openstack_connector.py | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/simple_vm_client/bibigrid_connector/bibigrid_connector.py b/simple_vm_client/bibigrid_connector/bibigrid_connector.py index 3f05319..3c3d081 100644 --- a/simple_vm_client/bibigrid_connector/bibigrid_connector.py +++ b/simple_vm_client/bibigrid_connector/bibigrid_connector.py @@ -125,7 +125,7 @@ def get_clusters_info(self) -> list[dict[str, str]]: return infos def is_bibigrid_available(self) -> bool: - logger.info(f"Checking if Bibigrid is available via: {self._BIBIGRID_EP}") + logger.info(f"Checking if Bibigrid is available") if not self._BIBIGRID_EP: logger.info("Bibigrid Url is not set") diff --git a/simple_vm_client/bibigrid_connector/test_bibigrid_connector.py b/simple_vm_client/bibigrid_connector/test_bibigrid_connector.py index d71dba5..acb2268 100644 --- a/simple_vm_client/bibigrid_connector/test_bibigrid_connector.py +++ b/simple_vm_client/bibigrid_connector/test_bibigrid_connector.py @@ -46,13 +46,14 @@ def setUp(self, mock_is_bibigrid_available): modes: {MODES} use_master_with_public_ip: {MASTER_WITH_PUBLIC_IP} localDnsLookup: {LOCAL_DNS_LOOKUP} + sub_network: {SUB_NETWORK} + ansibleGalaxyRoles: - role1 - role2 openstack: network: {NETWORK} - sub_network: {SUB_NETWORK} production: {PRODUCTION} """ diff --git a/simple_vm_client/forc_connector/test_forc_connector.py b/simple_vm_client/forc_connector/test_forc_connector.py index 7497ae9..49170cb 100644 --- a/simple_vm_client/forc_connector/test_forc_connector.py +++ b/simple_vm_client/forc_connector/test_forc_connector.py @@ -81,9 +81,6 @@ def test_load_config(self): os.remove(temp_file.name) self.assertEqual(self.forc_connector.FORC_URL, FORC_URL) self.assertEqual(self.forc_connector.FORC_ACCESS_URL, FORC_ACCESS_URL) - self.assertEqual( - self.forc_connector.FORC_SECURITY_GROUP_ID, FORC_SECRUITY_GROUP_ID - ) self.assertEqual(self.forc_connector.GITHUB_PLAYBOOKS_REPO, GITHUB_REPO) self.assertEqual(self.forc_connector.REDIS_HOST, REDIS_HOST) self.assertEqual(self.forc_connector.REDIS_PORT, REDIS_PORT) diff --git a/simple_vm_client/test_openstack_connector.py b/simple_vm_client/test_openstack_connector.py index f60e614..aaaa594 100644 --- a/simple_vm_client/test_openstack_connector.py +++ b/simple_vm_client/test_openstack_connector.py @@ -126,9 +126,10 @@ ssh_port_calculation: {PORT_CALCULATION} udp_port_calculation: {PORT_CALCULATION} gateway_security_group_id: "security_group_id" - production: true - forc: forc_security_group_id: "forc_security_group_id" + + production: true + """ @@ -200,7 +201,6 @@ def test_load_config_yml(self): # Assert that the configuration attributes are set correctly self.assertEqual(self.openstack_connector.GATEWAY_IP, "192.168.1.1") self.assertEqual(self.openstack_connector.NETWORK, "my_network") - self.assertEqual(self.openstack_connector.SUB_NETWORK, "my_sub_network") self.assertTrue(self.openstack_connector.PRODUCTION) self.assertEqual(self.openstack_connector.CLOUD_SITE, "my_cloud_site") self.assertEqual(