Skip to content

Commit

Permalink
add doc for debugging rest tests
Browse files Browse the repository at this point in the history
Signed-off-by: bowenlan-amzn <[email protected]>
  • Loading branch information
bowenlan-amzn committed Jun 21, 2024
1 parent 568c193 commit 3e88406
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ If in doubt about which command to use, simply run &lt;gradle path&gt;:check

Note that the REST tests, like all the integration tests, can be run against an external cluster by specifying the `tests.cluster` property, which if present needs to contain a comma separated list of nodes to connect to (e.g. localhost:9300).

## Debug REST tests

Since Rest tests can be run against an external cluster. You can launch an OpenSearch cluster in debug node following [Launching and debugging from an IDE](#launching-and-debugging-from-an-ide). And connect your Rest test to this cluster.
For example:

./gradlew :rest-api-spec:yamlRestTest \
-Dtests.cluster=localhost:9200 -Dtests.rest.cluster=localhost:9200 -Dtests.clustername=runTask-0

# Testing packaging

The packaging tests use Vagrant virtual machines or cloud instances to verify that installing and running OpenSearch distributions works correctly on supported operating systems. These tests should really only be run on ephemeral systems because they’re destructive; that is, these tests install and remove packages and freely modify system settings, so you will probably regret it if you execute them on your development machine.
Expand Down

0 comments on commit 3e88406

Please sign in to comment.