From 009f1268404a648fa7f3f85b1180e27fee20cdb4 Mon Sep 17 00:00:00 2001 From: Kawika Avilla Date: Tue, 8 Feb 2022 18:43:36 +0000 Subject: [PATCH] [BWC] Update docs and return cmd Signed-off-by: Kawika Avilla --- ONBOARDING.md | 2 ++ src/test_workflow/README.md | 21 +++++++++++++++++++ .../bwc_test/bwc_test_suite_opensearch.py | 3 ++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ONBOARDING.md b/ONBOARDING.md index 70266d1134..bbf4fb5f1c 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -51,3 +51,5 @@ Add the new plugin to the [opensearch-plugins meta](https://github.com/opensearc 2. If your plugin is dependent on `job-scheduler` zip, you can define that in `build-dependencies` in the config. Currently, the test workflow only supports `job-scheduler` as build dependency. Please create an issue if your plugin needs more support. 3. For backward compatibility testing, the `test-workflow` runs backward compatibility tests available in the plugin repository, (see [reference]((https://github.com/opensearch-project/anomaly-detection/blob/d9a122d05282f7efc1e24c61d64f18dec0fd47af/build.gradle#L428))). Like integration test, it has a set of configurable options defined in opensearch-1.3.0-test.yml, [example](manifests/1.3.0/opensearch-1.3.0-test.yml). + + 1. It supports two test configs - `with-security` and `without-security`, which runs test with security plugin enabled and disabled respectively. Choose one or both depending on what your plugin integration tests support. \ No newline at end of file diff --git a/src/test_workflow/README.md b/src/test_workflow/README.md index d692bce05d..f11921f62b 100644 --- a/src/test_workflow/README.md +++ b/src/test_workflow/README.md @@ -76,6 +76,27 @@ Usage: ./test.sh bwc-test ``` +For example, build locally and run BWC tests. + +```bash +./build.sh manifests/1.3.0/opensearch-1.3.0.yml +./assemble.sh builds/opensearch/manifest.yml +./test.sh bwc-test manifests/1.3.0/opensearch-1.3.0-test.yml . # looks for "./builds/opensearch/manifest.yml" and "./dist/opensearch/manifest.yml" +``` + +Or run BWC tests against an existing build. + +```bash +./test.sh bwc-test manifests/1.3.0/opensearch-1.3.0-test.yml --paths opensearch=https://ci.opensearch.org/ci/dbc/bundle-build/1.2.0/869/linux/x64 # looks for https://.../builds/opensearch/manifest.yml and https://.../dist/opensearch/manifest.yml +``` + +To run OpenSearch Dashboards BWC tests. + +```bash +./test.sh bwc-test manifests/1.3.0/opensearch-dashboards-1.3.0-test.yml --paths +opensearch-dashboards=https://ci.opensearch.org/ci/dbc/bundle-build-dashboards/1.2.0/869/linux/x64 +``` + ### Performance Tests TODO diff --git a/src/test_workflow/bwc_test/bwc_test_suite_opensearch.py b/src/test_workflow/bwc_test/bwc_test_suite_opensearch.py index da2b58bda0..45c8429c46 100644 --- a/src/test_workflow/bwc_test/bwc_test_suite_opensearch.py +++ b/src/test_workflow/bwc_test/bwc_test_suite_opensearch.py @@ -28,8 +28,9 @@ def __init__( manifest ) + # TODO: enable OpenSearch scripts to accept more arguments def get_cmd(self, script, security, manifest_build_location): - return f"{script}" + return script @property def test_artifact_files(self):