-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit tests for
osmorphing.amazon.py
module
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
- Loading branch information
1 parent
b1b9148
commit 5f12b2b
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2024 Cloudbase Solutions Srl | ||
# All Rights Reserved. | ||
|
||
|
||
from coriolis.osmorphing import amazon | ||
from coriolis.tests import test_base | ||
|
||
|
||
class BaseAmazonLinuxOSMorphingToolsTestCase(test_base.CoriolisBaseTestCase): | ||
"""Test suite for the BaseAmazonLinuxOSMorphingTools class.""" | ||
|
||
def test_check_os_supported(self): | ||
detected_os_info = { | ||
"distribution_name": amazon.AMAZON_DISTRO_NAME_IDENTIFIER, | ||
"release_version": "2" | ||
} | ||
|
||
result = amazon.BaseAmazonLinuxOSMorphingTools.check_os_supported( | ||
detected_os_info) | ||
|
||
self.assertTrue(result) | ||
|
||
def test_check_os_not_supported(self): | ||
detected_os_info = { | ||
"distribution_name": 'unsupported', | ||
} | ||
result = amazon.BaseAmazonLinuxOSMorphingTools.check_os_supported( | ||
detected_os_info) | ||
|
||
self.assertFalse(result) |