diff --git a/.gitignore b/.gitignore index 851d42e0ee1..67e5bb07e91 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ gen /artifacts/ /.pid.lock /.prom.pid.lock + +.java-version diff --git a/DEVELOPER_GUIDE.rst b/DEVELOPER_GUIDE.rst index 70293880859..bf9e6039305 100644 --- a/DEVELOPER_GUIDE.rst +++ b/DEVELOPER_GUIDE.rst @@ -141,6 +141,8 @@ The plugin codebase is in standard layout of Gradle project:: ├── core ├── doctest ├── opensearch + ├── filesystem + ├── prometheus ├── integ-test ├── legacy ├── plugin @@ -159,6 +161,8 @@ Here are sub-folders (Gradle modules) for plugin source code: - ``ppl``: PPL language processor. - ``core``: core query engine. - ``opensearch``: OpenSearch storage engine. +- ``prometheus``: Prometheus storage engine. +- ``filesystem``: File System storage engine (in development). - ``protocol``: request/response protocol formatter. - ``common``: common util code. - ``integ-test``: integration and comparison test. diff --git a/plugin/build.gradle b/plugin/build.gradle index 47542922163..d2bdb872750 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -30,6 +30,7 @@ plugins { } apply plugin: 'opensearch.pluginzip' +apply plugin: 'opensearch.rest-test' ext { projectSubstitutions = [:] @@ -226,3 +227,19 @@ afterEvaluate { } } } + +testClusters.integTest { + plugin(project.tasks.bundlePlugin.archiveFile) + + // debug with command, ./gradlew opensearch-sql:run -DdebugJVM. --debug-jvm does not work with keystore. + if (System.getProperty("debugJVM") != null) { + jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005' + } + + // add customized keystore + keystore 'plugins.query.federation.datasources.config', new File("$projectDir/src/test/resources/", 'datasources.json') +} + +run { + useCluster testClusters.integTest +}