Add negative functional test for message

Messages had positive tests, this commit introduces the negative
tests for the messages.

Change-Id: I4c7f75e470005e00a78f9e5c27bb4b7c3b67b1e7
Signed-off-by: Riane Torres <riane.torres@gmail.com>
This commit is contained in:
Riane Torres
2025-07-02 14:37:36 -04:00
parent ce60e4845a
commit 55862819ee

View File

@@ -11,6 +11,8 @@
# under the License.
from tempest.lib import exceptions
from manilaclient.tests.functional.osc import base
@@ -101,3 +103,17 @@ class MessagesCLITest(base.OSCClientTestBase):
messages = [msg for msg in messages
if msg['ID'] == message["ID"]]
self.assertEqual(0, len(messages))
def test_delete_message_wrong_id(self):
self.assertRaises(
exceptions.CommandFailed,
self.openstack,
'share message delete 0'
)
def test_show_message_wrong_id(self):
self.assertRaises(
exceptions.CommandFailed,
self.openstack,
'share message show'
)