From fbb290b2238e9e72054892e9ae6108a8907f47d7 Mon Sep 17 00:00:00 2001 From: Douglas Viroel Date: Thu, 28 Nov 2024 15:06:41 -0300 Subject: [PATCH] Fix create_continuous_audit_with_wrong_interval test assert "test_create_continuous_audit_with_wrong_interval" is failing to validate the expected error message when creating a continuous audit with a wrong interval. The error message is now slightly different, since "croniter" was bumped to latest version in openstack requirements[1]. Closes-Bug: #2089866 [1] https://github.com/openstack/requirements/commit/868e0ae644099165f9f540b8daa23b4b9a73eee5 Change-Id: I33029d224577bd1d5124947f1e6150fe2dbc9456 --- watcher/tests/api/v1/test_audits.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/watcher/tests/api/v1/test_audits.py b/watcher/tests/api/v1/test_audits.py index 505923593..c7506d044 100644 --- a/watcher/tests/api/v1/test_audits.py +++ b/watcher/tests/api/v1/test_audits.py @@ -701,8 +701,10 @@ class TestPost(api_base.FunctionalTest): response = self.post_json('/audits', audit_dict, expect_errors=True) self.assertEqual('application/json', response.content_type) self.assertEqual(HTTPStatus.INTERNAL_SERVER_ERROR, response.status_int) - expected_error_msg = ('Exactly 5 or 6 columns has to be ' - 'specified for iterator expression.') + # NOTE(dviroel): this error message check was shortened to try avoid + # future breakages. See bug #2089866 for more details. + expected_error_msg = ('columns has to be specified for iterator ' + 'expression.') self.assertTrue(response.json['error_message']) self.assertIn(expected_error_msg, response.json['error_message'])