Skip to content

Commit badf815

Browse files
committed
[MODEL] Added the "Development and Community" chapter to the README
* Added a note about running tests against a test cluster to README * Launch only 1 node on test startup
1 parent 447438e commit badf815

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

elasticsearch-model/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,21 @@ response.records.records.class
647647
More examples can be found in the `examples` folder. Please see the `Elasticsearch::Model::Adapter`
648648
module and its submodules for technical information.
649649

650+
## Development and Community
651+
652+
For local development, clone the repository and run `bundle install`. See `rake -T` for a list of
653+
available Rake tasks for running tests, generating documentation, starting a testing cluster, etc.
654+
655+
Bug fixes and features must be covered by unit tests.
656+
657+
Github's pull requests and issues are used to communicate, send bug reports and code contributions.
658+
659+
To run all tests against a test Elasticsearch cluster, use a command like this:
660+
661+
```bash
662+
curl -# https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.0.RC1.tar.gz | tar xz -C tmp/
663+
SERVER=start TEST_CLUSTER_COMMAND=$PWD/tmp/elasticsearch-1.0.0.RC1/bin/elasticsearch bundle exec rake test:all
664+
```
650665

651666
## License
652667

elasticsearch-model/test/test_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module Test
3333
class IntegrationTestCase < ::Test::Unit::TestCase
3434
extend Elasticsearch::Extensions::Test::StartupShutdown
3535

36-
startup { Elasticsearch::Extensions::Test::Cluster.start if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running? }
36+
startup { Elasticsearch::Extensions::Test::Cluster.start(nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running? }
3737
shutdown { Elasticsearch::Extensions::Test::Cluster.stop if ENV['SERVER'] && started? }
3838
context "IntegrationTest" do; should "noop on Ruby 1.8" do; end; end if RUBY_1_8
3939

0 commit comments

Comments
 (0)