Skip to content

Commit d506442

Browse files
authored
Build: Make plugin list for smoke tester dynamic (#23601)
This commit removes the hardcoded list of plugins used by the smoke tester and instead loads this list the same way the build does: by looking for directories under the `plugins` dir. closes #13096
1 parent e72d287 commit d506442

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

dev-tools/smoke_test_rc.py

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import argparse
4545
import tempfile
4646
import os
47+
from os.path import basename, dirname, isdir, join
4748
import signal
4849
import shutil
4950
import urllib
@@ -57,26 +58,14 @@
5758

5859
from http.client import HTTPConnection
5960

60-
DEFAULT_PLUGINS = ["analysis-icu",
61-
"analysis-kuromoji",
62-
"analysis-phonetic",
63-
"analysis-smartcn",
64-
"analysis-stempel",
65-
"discovery-azure-classic",
66-
"discovery-ec2",
67-
"discovery-file",
68-
"discovery-gce",
69-
"ingest-attachment",
70-
"ingest-geoip",
71-
"ingest-user-agent",
72-
"mapper-attachments",
73-
"mapper-murmur3",
74-
"mapper-size",
75-
"repository-azure",
76-
"repository-gcs",
77-
"repository-hdfs",
78-
"repository-s3",
79-
"store-smb"]
61+
def find_official_plugins():
62+
plugins_dir = join(dirname(dirname(__file__)), 'plugins')
63+
plugins = []
64+
for plugin in os.listdir(plugins_dir):
65+
if isdir(join(plugins_dir, plugin)):
66+
plugins.append(plugin)
67+
return plugins
68+
DEFAULT_PLUGINS = find_official_plugins()
8069

8170
try:
8271
JAVA_HOME = os.environ['JAVA_HOME']

0 commit comments

Comments
 (0)