Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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)
Exemple #4
0
 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()