diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2024-02-27 21:16:20 +0100 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2024-02-27 21:16:20 +0100 |
commit | d9a7933dcfd3fd296be9b877a4801c992bf2658b (patch) | |
tree | aa6b75daeaecc86fedcc3551d6a557c3fed925b3 /tests | |
parent | 8193babda45e3fcffb38b844c841b64f317c9f62 (diff) |
Fix distribution status check error
Check if the set of components to which distribution is required
is a subset of the set of components to which the service model
has beed distributed
Issue-ID: TEST-404
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I4ed15a38022ccefab8148fa9f46a4e5ef38dc212
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_sdc2_service.py | 11 | ||||
-rw-r--r-- | tests/test_version.py | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_sdc2_service.py b/tests/test_sdc2_service.py index b189687..0984cf8 100644 --- a/tests/test_sdc2_service.py +++ b/tests/test_sdc2_service.py @@ -542,6 +542,17 @@ def test_service_distribution_distribution_components_test(mock_distribution_sta ] assert sd._distribution_components_test is True + mock_distribution_status_list.return_value = [ + ServiceDistribution.DistributionStatus( + component_id=component_id, + timestamp=str(randint(0, maxsize)), + status=str(uuid4()), + url=str(uuid4()), + error_reason=str(uuid4()) + ) for component_id in settings.SDC_SERVICE_DISTRIBUTION_COMPONENTS + ["additional-test-component"] + ] + assert sd._distribution_components_test is True + @patch("onapsdk.sdc2.service.ServiceDistribution.distribution_status_list", new_callable=PropertyMock) def test_service_distribution_no_distribution_errors_test(mock_distribution_status_list): diff --git a/tests/test_version.py b/tests/test_version.py index 23a3b9c..eac3433 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -17,4 +17,4 @@ import onapsdk.version as version def test_version(): """Check version is the right one.""" - assert version.__version__ == '13.0.3' + assert version.__version__ == '13.0.4' |