diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/helm_charts.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/helm_charts.py index 86524f8528..67b63ece7b 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/helm_charts.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/helm_charts.py @@ -83,7 +83,8 @@ class HelmChartsController(rest.RestController): try: system_overrides = pecan.request.rpcapi.get_helm_chart_overrides( pecan.request.context, app_name, name, namespace) - system_overrides = yaml.safe_dump(system_overrides) \ + system_overrides = yaml.safe_dump(system_overrides, + default_flow_style=None) \ if system_overrides else None except Exception as e: raise wsme.exc.ClientSideError(_("Unable to get the helm chart overrides " diff --git a/sysinv/sysinv/sysinv/sysinv/tests/api/test_helm_charts.py b/sysinv/sysinv/sysinv/sysinv/tests/api/test_helm_charts.py index 03be16b71d..c62f4dfabd 100644 --- a/sysinv/sysinv/sysinv/sysinv/tests/api/test_helm_charts.py +++ b/sysinv/sysinv/sysinv/sysinv/tests/api/test_helm_charts.py @@ -172,6 +172,8 @@ class ApiHelmChartShowTestSuiteMixin(ApiHelmChartTestCaseMixin): def test_no_system_override(self): self.fake_system_app.return_value = False + self.fake_merge_overrides.return_value = {} + url = self.get_single_url_helm_override('platform-integ-apps', 'ceph-pools-audit', 'kube-system') response = self.get_json(url) @@ -264,6 +266,7 @@ class ApiHelmChartShowTestSuiteMixin(ApiHelmChartTestCaseMixin): self.fake_helm_apps.return_value = ['platform-integ-apps'] # Return helm chart overrides self.fake_override.return_value = {"enabled": True} + self.fake_merge_overrides.return_value = {} url = self.get_single_url_helm_override('platform-integ-apps', 'ceph-pools-audit', 'kube-system') @@ -294,6 +297,7 @@ class ApiHelmChartDeleteTestSuiteMixin(ApiHelmChartTestCaseMixin): # Test that a valid DELETE operation is successful def test_delete_helm_override_success(self): self.fake_system_app.return_value = False + self.fake_merge_overrides.return_value = {} # Verify that user override exists initially url = self.get_single_url_helm_override('platform-integ-apps', @@ -502,6 +506,8 @@ class ApiHelmChartPatchTestSuiteMixin(ApiHelmChartTestCaseMixin): headers=self.API_HEADERS, expect_errors=True) self.fake_system_app.return_value = False + self.fake_merge_overrides.return_value = {} + response = self.get_json(url, expect_errors=True) self.assertEqual(response.status_code, http_client.OK) # Verify the values of the response with the values in database