Fix nox generate (#830)
* Fix: don't rely on a specific plugin for the test. Signed-off-by: dblock <dblock@amazon.com> * Ignore ISM. Signed-off-by: dblock <dblock@amazon.com> --------- Signed-off-by: dblock <dblock@amazon.com>
This commit is contained in:
committed by
GitHub
parent
1b0440a33f
commit
44f712e3f0
@@ -8,6 +8,7 @@
|
||||
# GitHub history for details.
|
||||
|
||||
|
||||
import re
|
||||
import warnings
|
||||
|
||||
import pytest
|
||||
@@ -24,8 +25,7 @@ class TestPluginsClient:
|
||||
client = AsyncOpenSearch()
|
||||
# testing double-init here
|
||||
client.plugins.__init__(client) # type: ignore # pylint: disable=unnecessary-dunder-call
|
||||
assert (
|
||||
str(w[0].message)
|
||||
== "Cannot load `alerting` directly to AsyncOpenSearch as it already exists. Use "
|
||||
"`AsyncOpenSearch.plugin.alerting` instead."
|
||||
assert re.match(
|
||||
r"Cannot load `\w+` directly to AsyncOpenSearch as it already exists. Use `AsyncOpenSearch.plugin.\w+` instead.",
|
||||
str(w[0].message),
|
||||
)
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -704,6 +704,10 @@ def read_modules() -> Any:
|
||||
namespace = "__init__"
|
||||
name = key
|
||||
|
||||
# FIXME: we have a hard-coded index_management that needs to be deprecated in favor of the auto-generated one
|
||||
if namespace == "ism":
|
||||
continue
|
||||
|
||||
# Group the data in the current group by the "path" key
|
||||
paths = []
|
||||
all_paths_have_deprecation = True
|
||||
|
||||
Reference in New Issue
Block a user