From ce29577ca286627b7a2ceb152e2bfd00d3536209 Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 5 Aug 2024 16:37:35 -0400 Subject: [PATCH] Added integration-min to skip running tests w/plugins. Signed-off-by: dblock --- .github/workflows/test.yml | 8 +++++--- .github/workflows/test_unreleased.yml | 4 ++-- DEVELOPER_GUIDE.md | 2 +- composer.json | 3 +++ tests/ClientIntegrationTest.php | 1 + .../SniffingConnectionPoolIntegrationTest.php | 1 + .../StaticConnectionPoolIntegrationTest.php | 1 + tests/Endpoints/CreateIntegrationTest.php | 1 + tests/Endpoints/CreatePointInTimeIntegrationTest.php | 1 + tests/Endpoints/DeletePointInTimeIntegrationTest.php | 1 + 10 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 831aba37..860cb57a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,7 +132,7 @@ jobs: composer run unit integration-test-elasticsearch: - name: Tntegration Test (Elasticsearch) + name: Integration Test (Elasticsearch) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -175,7 +175,7 @@ jobs: OPENSEARCH_URL: 'http://localhost:9200' integration-test-opensearch: - name: Tntegration Test (OpenSearch) + name: Integration Test (OpenSearch) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -234,7 +234,7 @@ jobs: OPENSEARCH_URL: 'http://localhost:9200' integration-test-opensearch-strong-password: - name: Tntegration Test (OpenSearch w/Strong Password) + name: Integration Test (OpenSearch w/Strong Password) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -244,6 +244,8 @@ jobs: search-server-image: - opensearchproject/opensearch:2.12.0 - opensearchproject/opensearch:2.13.0 + - opensearchproject/opensearch:2.14.0 + - opensearchproject/opensearch:2.15.0 services: search-server: image: ${{ matrix.search-server-image }} diff --git a/.github/workflows/test_unreleased.yml b/.github/workflows/test_unreleased.yml index ac03cedb..c502bf0d 100644 --- a/.github/workflows/test_unreleased.yml +++ b/.github/workflows/test_unreleased.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - opensearch_ref: [ '1.x', '2.x', '2.0', 'main' ] + opensearch_ref: [ '1.x', '2.x', 'main' ] steps: - name: Checkout PHP Client uses: actions/checkout@v2 @@ -73,6 +73,6 @@ jobs: - name: Integration tests run: | - composer run integration + composer run integration-min env: OPENSEARCH_URL: 'http://localhost:9200' diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 11f396c4..5c71551e 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -34,7 +34,7 @@ If you don't have a running server, you can start one with Docker using `docker The integration tests are using by default following address `https://admin:admin@localhost:9200`. This can be changed by setting the environment variable `OPENSEARCH_URL` to a different url. -To run the integration tests, you can use `composer run integration` +To run the integration tests, you can use `composer run integration-min` for just OpenSearch or `composer run integration` for OpenSearch and its plugins. ```bash export OPENSEARCH_PASSWORD=myStrongPassword123! diff --git a/composer.json b/composer.json index 6b5af53b..dd4520ae 100644 --- a/composer.json +++ b/composer.json @@ -61,6 +61,9 @@ "integration": [ "phpunit --group Integration" ], + "integration-min": [ + "phpunit --group Integration-Min" + ], "phpunit": [ "phpunit" ], diff --git a/tests/ClientIntegrationTest.php b/tests/ClientIntegrationTest.php index 5b491217..c52d9971 100644 --- a/tests/ClientIntegrationTest.php +++ b/tests/ClientIntegrationTest.php @@ -33,6 +33,7 @@ * * @subpackage Tests * @group Integration + * @group Integration-Min */ class ClientIntegrationTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php b/tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php index 0373a4e8..e73b1794 100644 --- a/tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php +++ b/tests/ConnectionPool/SniffingConnectionPoolIntegrationTest.php @@ -32,6 +32,7 @@ * * @subpackage Tests/SniffingConnectionPoolTest * @group Integration + * @group Integration-Min */ class SniffingConnectionPoolIntegrationTest extends TestCase { diff --git a/tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php b/tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php index 6bfc6524..0f3462c3 100644 --- a/tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php +++ b/tests/ConnectionPool/StaticConnectionPoolIntegrationTest.php @@ -29,6 +29,7 @@ * * @subpackage Tests/StaticConnectionPoolTest * @group Integration + * @group Integration-Min */ class StaticConnectionPoolIntegrationTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/Endpoints/CreateIntegrationTest.php b/tests/Endpoints/CreateIntegrationTest.php index f3ef4eb6..55e5e3b0 100644 --- a/tests/Endpoints/CreateIntegrationTest.php +++ b/tests/Endpoints/CreateIntegrationTest.php @@ -28,6 +28,7 @@ * * @subpackage Tests\Endpoints * @group Integration + * @group Integration-Min */ class CreateIntegrationTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/Endpoints/CreatePointInTimeIntegrationTest.php b/tests/Endpoints/CreatePointInTimeIntegrationTest.php index c27f76b5..7e3033e9 100644 --- a/tests/Endpoints/CreatePointInTimeIntegrationTest.php +++ b/tests/Endpoints/CreatePointInTimeIntegrationTest.php @@ -29,6 +29,7 @@ * * @subpackage Tests\Endpoints * @group Integration + * @group Integration-Min */ class CreatePointInTimeIntegrationTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/Endpoints/DeletePointInTimeIntegrationTest.php b/tests/Endpoints/DeletePointInTimeIntegrationTest.php index ad9b2833..d1a7d22e 100644 --- a/tests/Endpoints/DeletePointInTimeIntegrationTest.php +++ b/tests/Endpoints/DeletePointInTimeIntegrationTest.php @@ -29,6 +29,7 @@ * * @subpackage Tests\Endpoints * @group Integration + * @group Integration-Min */ class DeletePointInTimeIntegrationTest extends \PHPUnit\Framework\TestCase {