mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Add a set of scripts that simplify: * The necessary setup for the CI test to be executed. * The actuall CI test execution, having a different scripts for each different workflow. This makes the test execution simpler and standard, so changes in internal task don't need big changes in the CI config. It also documents and makes easy for developers to run the tests.
ci scripts renaming wrap up all different test workflows into a single script with an argument Fixes #2639
This commit is contained in:
parent
4abb4a0e2b
commit
48d6ab5b3f
2 changed files with 34 additions and 0 deletions
11
ci/ci_setup.sh
Executable file
11
ci/ci_setup.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#squid proxy work, so if there is a proxy it can be cached.
|
||||
sed -i.bak 's/https:/http:/' tools/Gemfile
|
||||
|
||||
# Clean up some possible stale directories
|
||||
rm -rf vendor # make sure there are no vendorized dependencies
|
||||
rm -rf spec/reports # no stale spec reports from previous executions
|
||||
|
||||
# Setup the environment
|
||||
rake bootstrap # Bootstrap your logstash instance
|
23
ci/ci_test.sh
Executable file
23
ci/ci_test.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
##
|
||||
# Keep in mind to run ci/ci_setup.sh if you need to setup/clean up your environment before
|
||||
# running the test suites here.
|
||||
##
|
||||
|
||||
SELECTED_TEST_SUITE=$1
|
||||
|
||||
if [[ $SELECTED_TEST_SUITE == $"all" ]]; then
|
||||
echo "Running all plugins tests"
|
||||
rake plugin:install-all # Install all plugins, using the file at tools/Gemfile.plugins.all
|
||||
rake vendor:append_development_dependencies\[tools/Gemfile.plugins.all\] # Append development dependencies to run the test
|
||||
rake plugin:install-all # Install previously appended development dependencies
|
||||
|
||||
#Run the specs test from all previously installed logstash plugins
|
||||
./bin/logstash rspec --order rand vendor/bundle/jruby/1.9/gems/logstash-*/spec/{input,filter,codec,output}s/*_spec.rb
|
||||
else
|
||||
echo "Running core tests"
|
||||
rake test:prep # setup the necessary plugins and dependencies for testing
|
||||
# Execute the test
|
||||
./bin/logstash rspec --order rand --format CI::Reporter::RSpec spec/**/*_spec.rb spec/*_spec.rb
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue