From 59ed9448f44aacfd9e7cceb533b53070db80229d Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 13 Jul 2022 19:59:12 +0000 Subject: [PATCH 1/5] Create workflow for bulk run of integraton tests Signed-off-by: Peter Nied --- .github/workflows/integration-tests.yml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/integration-tests.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000000..cf7581bc62 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,40 @@ +name: Bulk Integration Test + +on: [ + workflow_dispatch, + # Uncomment below to automatically run on pushes to branches + # push, + ] + +env: + GRADLE_OPTS: -Dhttp.keepAlive=false + +jobs: + bulk-integration-test-run: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + jdk: [11, 17] + test-run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + + steps: + - uses: actions/setup-java@v2 + with: + distribution: temurin # Temurin is a distribution of adoptium + java-version: ${{ matrix.jdk }} + + - uses: actions/checkout@v2 + + - run: OPENDISTRO_SECURITY_TEST_OPENSSL_OPT=true ./gradlew test + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: ${{ matrix.jdk }}-${{ matrix.test-run }}-reports + path: | + ./build/reports/ + + - name: check archive for debugging + if: always() + run: echo "Check the artifact ${{ matrix.jdk }}-${{ matrix.test-run }}-reports.zip for detailed test results" \ No newline at end of file From ee79b68f53d5b0f9169dadc9faa81dfc91412027 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 13 Jul 2022 20:09:53 +0000 Subject: [PATCH 2/5] Update dev guide Signed-off-by: Peter Nied --- DEVELOPER_GUIDE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 9fc1715033..e0d35e1a35 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -6,6 +6,8 @@ So you want to contribute code to this project? Excellent! We're glad you're her - [Native platforms](#native-platforms) - [Building](#building) - [Using IntelliJ IDEA](#using-intellij-idea) + - [Running integration tests](#running-integration-tests) + - [Bulk test runs](#bulk-test-runs) - [Submitting Changes](#submitting-changes) - [Backports](#backports) @@ -135,6 +137,13 @@ curl -XGET https://localhost:9200/_plugins/_security/authinfo -u 'admin:admin' - Launch IntelliJ IDEA, choose **Project from Existing Sources**, and select directory with Gradle build script (`build.gradle`). +## Running integration tests + +Integration tests are automatically run on all pull requests for all supported versions of the JDK. These must pass for the change(s) to be merged. + +### Bulk test runs +To collect reliability data on test runs there is a manual GitHub action workflow called `Bulk Integration Test`. The workflow is started for a branch on this project or in a fork by going to [GitHub action workflows](https://github.com/opensearch-project/security/actions/workflows/integration-tests.yml) and selecting `Run Workflow`. + ## Submitting Changes See [CONTRIBUTING](CONTRIBUTING.md). From d86326a60a37cdfd61a8d121729756c077101108 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 13 Jul 2022 20:11:44 +0000 Subject: [PATCH 3/5] Include local run details and test logs Signed-off-by: Peter Nied --- DEVELOPER_GUIDE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index e0d35e1a35..f1e42e1663 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -139,7 +139,9 @@ Launch IntelliJ IDEA, choose **Project from Existing Sources**, and select direc ## Running integration tests -Integration tests are automatically run on all pull requests for all supported versions of the JDK. These must pass for the change(s) to be merged. +Locally these can be run with `./gradlew test` with detailed results being avaliable at `${project-root}/build/reports/tests/test/index.html`, or run through an IDEs JUnit test runner. + +Integration tests are automatically run on all pull requests for all supported versions of the JDK. These must pass for change(s) to be merged. Detailed logs of these test results are avaliable by going to the GitHub action workflow's summary view and downloading the associated jdk version run of the tests, after extracting this file onto your local machine integration tests results are at `./tests/tests/index.html`. ### Bulk test runs To collect reliability data on test runs there is a manual GitHub action workflow called `Bulk Integration Test`. The workflow is started for a branch on this project or in a fork by going to [GitHub action workflows](https://github.com/opensearch-project/security/actions/workflows/integration-tests.yml) and selecting `Run Workflow`. From fc8488fe6a183d5c548c005070c456538d74076f Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Wed, 13 Jul 2022 20:47:14 +0000 Subject: [PATCH 4/5] Fix missing newline at the end of integration-tests.yml Signed-off-by: Peter Nied --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cf7581bc62..9589486198 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -37,4 +37,4 @@ jobs: - name: check archive for debugging if: always() - run: echo "Check the artifact ${{ matrix.jdk }}-${{ matrix.test-run }}-reports.zip for detailed test results" \ No newline at end of file + run: echo "Check the artifact ${{ matrix.jdk }}-${{ matrix.test-run }}-reports.zip for detailed test results" From b6920526c31b75caf0d68f89b08b0eb8db57f3f7 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Thu, 14 Jul 2022 18:47:31 +0000 Subject: [PATCH 5/5] Remove comment to run on push Signed-off-by: Peter Nied --- .github/workflows/integration-tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 9589486198..b609ad7293 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,10 +1,6 @@ name: Bulk Integration Test -on: [ - workflow_dispatch, - # Uncomment below to automatically run on pushes to branches - # push, - ] +on: [ workflow_dispatch ] env: GRADLE_OPTS: -Dhttp.keepAlive=false