def test_cloud_metadata_GCP(self, mock_get_env_cloud_details): # WHEN cloud = CloudMetadata.from_utils() # THEN self.assertEqual("gcp", cloud.provider) self.assertEqual("us-central1", cloud.region)
def test_cloud_metadata_AWS(self, mock_get_env_cloud_details): # WHEN cloud = CloudMetadata.from_utils() # THEN self.assertEqual("aws", cloud.provider) self.assertEqual("us-east-1", cloud.region)
def test_cloud_metadata_AZURE(self, mock_get_env_cloud_details): # WHEN cloud = CloudMetadata.from_utils() # THEN self.assertEqual("azure", cloud.provider) self.assertEqual("eastus", cloud.region)
def _get_cloud_metadata(self) -> CloudMetadata: if self._cloud is None: self._cloud = CloudMetadata.from_utils() return self._cloud
def _get_cloud_metadata(self) -> CloudMetadata: return CloudMetadata.from_utils()