Skip to content

Commit

Permalink
Add a script to run one command for all bwc tests (#931)
Browse files Browse the repository at this point in the history
Currently, even we have bwc tests and data, to run bwc, we need
to copy and unzip data in opensearch, then run opensearch,
dashboards and cypress. This script will add more automation to
allow us use one command to run all the tests. Here is the cmd:

./scripts/bwctest-osd.sh
-o /path/to/opensearch.tar.gz
-d /path/to/opensearch-dashboards.tar.gz
-v versions
-b true/false

-o is the path to the tested opensearch. Here we need to rename
the folder to opensearch and zip it
-d is the path to the tested opensearch-dashboards. Also need to
rename the folder to opensearch-dashboards and zip it
-v is the optional version para. You can specify one version or
multiple versions like "odfe-1.1.0, osd-1.0.0". If no pass, it will
run all the versions defined in the script.
-b is the optional osd type para. If pass true, it will run osd bundle.
If pass false, it will run osd vanilla. The default is false.

update the usage section with new parameters
add license header and move the script in scripts folder

modify bwc test script:
1)use curl command to check the opensearch and dashboards status
2)create test groups to eliminate if clauses
3)modify var names
4)wrap each block into functions to make it more reusable
5)add more comments

clean out usage on port 5601
add test command and modify checking logic
fix license

Partically Resolved:
opensearch-project/opensearch-build#705

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
  • Loading branch information
ananzh authored Jan 5, 2022
1 parent d48d001 commit b9ae16e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"osd": "node scripts/osd",
"opensearch": "node scripts/opensearch",
"test": "grunt test",
"test:bwc": "./scripts/bwctest-osd.sh",
"test:jest": "node scripts/jest",
"test:jest_integration": "node --no-deprecation scripts/jest_integration",
"test:mocha": "node scripts/mocha",
Expand Down
Empty file modified scripts/bwctest-osd.sh
100644 → 100755
Empty file.

0 comments on commit b9ae16e

Please sign in to comment.