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] 868e0ae644

Change-Id: I33029d224577bd1d5124947f1e6150fe2dbc9456
This commit is contained in:
Douglas Viroel 2024-11-28 15:06:41 -03:00
parent 1f8d06e075
commit fbb290b223

View File

@ -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'])