Fix nox generate (#830)

* Fix: don't rely on a specific plugin for the test.

Signed-off-by: dblock <[email protected]>

* Ignore ISM.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2024-09-27 11:14:17 -07:00
committed by GitHub
parent 1b0440a33f
commit 44f712e3f0
3 changed files with 15 additions and 8 deletions
@@ -7,6 +7,8 @@
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
import re
from opensearchpy.client import OpenSearch
from ...test_cases import TestCase
@@ -18,8 +20,9 @@ class TestPluginsClient(TestCase):
client = OpenSearch()
# double-init
client.plugins.__init__(client) # type: ignore # pylint: disable=unnecessary-dunder-call
self.assertEqual(
str(w.warnings[0].message),
"Cannot load `alerting` directly to OpenSearch as "
"it already exists. Use `OpenSearch.plugin.alerting` instead.",
self.assertTrue(
re.match(
r"Cannot load `\w+` directly to OpenSearch as it already exists. Use `OpenSearch.plugin.\w+` instead.",
str(w.warnings[0].message),
)
)