summaryrefslogtreecommitdiff
path: root/tests/unittests/sources/test_azure_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/sources/test_azure_helper.py')
-rw-r--r--tests/unittests/sources/test_azure_helper.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/tests/unittests/sources/test_azure_helper.py b/tests/unittests/sources/test_azure_helper.py
index 38a57b99..ac2126e8 100644
--- a/tests/unittests/sources/test_azure_helper.py
+++ b/tests/unittests/sources/test_azure_helper.py
@@ -196,28 +196,6 @@ class TestGoalStateParsing(CiTestCase):
goal_state = self._get_goal_state(instance_id=instance_id)
self.assertEqual(instance_id, goal_state.instance_id)
- def test_instance_id_byte_swap(self):
- """Return true when previous_iid is byteswapped current_iid"""
- previous_iid = "D0DF4C54-4ECB-4A4B-9954-5BDF3ED5C3B8"
- current_iid = "544CDFD0-CB4E-4B4A-9954-5BDF3ED5C3B8"
- self.assertTrue(
- azure_helper.is_byte_swapped(previous_iid, current_iid)
- )
-
- def test_instance_id_no_byte_swap_same_instance_id(self):
- previous_iid = "D0DF4C54-4ECB-4A4B-9954-5BDF3ED5C3B8"
- current_iid = "D0DF4C54-4ECB-4A4B-9954-5BDF3ED5C3B8"
- self.assertFalse(
- azure_helper.is_byte_swapped(previous_iid, current_iid)
- )
-
- def test_instance_id_no_byte_swap_diff_instance_id(self):
- previous_iid = "D0DF4C54-4ECB-4A4B-9954-5BDF3ED5C3B8"
- current_iid = "G0DF4C54-4ECB-4A4B-9954-5BDF3ED5C3B8"
- self.assertFalse(
- azure_helper.is_byte_swapped(previous_iid, current_iid)
- )
-
def test_certificates_xml_parsed_and_fetched_correctly(self):
m_azure_endpoint_client = mock.MagicMock()
certificates_url = "TestCertificatesUrl"
@@ -1417,42 +1395,6 @@ class TestGetMetadataGoalStateXMLAndReportFailureToFabric(CiTestCase):
)
-class TestChassisAssetTag:
- def test_true_azure_cloud(self, caplog, mock_dmi_read_dmi_data):
- mock_dmi_read_dmi_data.return_value = (
- azure_helper.ChassisAssetTag.AZURE_CLOUD.value
- )
-
- asset_tag = azure_helper.ChassisAssetTag.query_system()
-
- assert asset_tag == azure_helper.ChassisAssetTag.AZURE_CLOUD
- assert caplog.record_tuples == [
- (
- "cloudinit.sources.helpers.azure",
- 10,
- "Azure chassis asset tag: "
- "'7783-7084-3265-9085-8269-3286-77' (AZURE_CLOUD)",
- )
- ]
-
- @pytest.mark.parametrize("tag", [None, "", "notazure"])
- def test_false_on_nonazure_chassis(
- self, caplog, mock_dmi_read_dmi_data, tag
- ):
- mock_dmi_read_dmi_data.return_value = tag
-
- asset_tag = azure_helper.ChassisAssetTag.query_system()
-
- assert asset_tag is None
- assert caplog.record_tuples == [
- (
- "cloudinit.sources.helpers.azure",
- 10,
- "Non-Azure chassis asset tag: %r" % tag,
- )
- ]
-
-
class TestOvfEnvXml:
@pytest.mark.parametrize(
"ovf,expected",