Skip to content

Commit 9952979

Browse files
committed
[DOCS] Updates CONTRIBUTING
1 parent e55a11a commit 9952979

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

CONTRIBUTING.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ This will run `bundle install` in all subprojects.
1616

1717
You can run the client code right away in a Interactive Ruby Shell by running the following command from the project's root directory:
1818
```
19-
$ ./elasticsearch/bin/elastic_ruby_console
19+
$ rake console # calls ./elasticsearch/bin/elastic_ruby_console
2020
[1] elastic_ruby(main)> client = Elasticsearch::Client.new(host: 'http://elastic:changeme@localhost:9200', log: true)
2121
[2] elastic_ruby(main)> client.info
2222
```
2323

24-
This will use either `irb` or `pry` and load the `elasticsearch` and `elasticsearch-api` gems into the shell.
24+
This will use either `irb` or `pry` and load the `elasticsearch` and `elasticsearch-api` gems into the shell.
2525

2626
# Tests
2727

@@ -31,8 +31,8 @@ To run the tests, you need to start a testing cluster on port 9200. We suggest u
3131
rake docker:start[VERSION]
3232
```
3333

34-
E.g.: `rake docker:start[8.0-SNAPSHOT]`.
35-
To start the container with Platinum, pass it in as a parameter: `rake docker:start[7.x-SNAPSHOT,platinum]`.
34+
E.g.: `rake docker:start[9.0.0-SNAPSHOT]`.
35+
To start the container with Platinum, pass it in as a parameter: `rake docker:start[8.x-SNAPSHOT,platinum]`.
3636

3737
There's another rake task that will read the STACK_VERSION value from `.buildkite/pipeline.yml` and run that version of Elasticsearch: `rake es:up`.
3838

@@ -42,6 +42,12 @@ max virtual memory areas vm.max_map_count [65530] likely too low, increase to at
4242
```
4343
Check [this link](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_set_vm_max_map_count_to_at_least_262144) for instructions on how to fix it.
4444

45+
You can also use [start-local](https://github.com/elastic/start-local), which can run Elasticsearch and Kibana locally for development/testing. You only need to run Elasticsearch (`-esonly`) for development purposes, and you can specify a version with the `-v` parameter:
46+
47+
```bash
48+
curl -fsSL https://elastic.co/start-local | sh -s -- -esonly -v 9.0.0
49+
```
50+
4551
As mentioned, the tests will atempt to run against `http://localhost:9200` by default. We provide the Docker task for the test cluster and recommend using it. But you can provide a different test server of your own. If you're using a different host or port, set the `TEST_ES_SERVER` environment variable with the server information. E.g.:
4652

4753
```
@@ -51,12 +57,20 @@ $ TEST_ES_SERVER='http://localhost:9250' be rake test:client
5157
To run all the tests in all the subprojects, use the Rake task:
5258

5359
```
54-
time rake test:client
60+
rake test:client
5561
```
5662

57-
# Elasticsearch Rest API YAML Test Runner
63+
# Elasticsearch Rest API Tests
64+
65+
The integration tests on this project run the [Elasticsearch Client tests](https://github.com/elastic/elasticsearch-clients-tests/) with the [Elasticsearch Tests Runner](https://github.com/elastic/es-test-runner-ruby/) library. This runs in CI against an Elasticsearch cluster in Docker. The [Elasticsearch's REST API Spec tests](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/test#test-suite) can still be ran following [these instructions](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-api/api-spec-testing#readme).
66+
67+
You can run the yaml API tests with:
68+
69+
```
70+
rake test:yaml
71+
```
5872

59-
See the API Spec tests [README](https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-api/api-spec-testing#readme).
73+
Check `rake -T` for more test tasks.
6074

6175
# Contributing
6276

0 commit comments

Comments
 (0)