-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report #36
Report #36
Conversation
Shortcut to what the report looks like just now: |
a37cf05
to
20b42d6
Compare
It should run for every Pull Request and automatically add a commit to the Pull Request if the report has any changes, or open a new Pull Request if there's a push to |
cb69368
to
04c3e81
Compare
I updated it so that every endpoint that is listed as "tested" includes a link to the test file where it's being tested. |
bc5b63f
to
cb63a7d
Compare
cb63a7d
to
ba83b22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, LGTM!
Test report
This is a Ruby script that generates the
../apis_report.md
file.Usage:
Download artifacts
Download the necessary files with
rake download_all
. This will download and unzip the Elasticsearch JSON API spec and the elasticsearch-specification spec. The files will be downloaded to./tmp/rest-api-spec
and./tmp/schema.json
respectively. Thetmp
directory is added to.gitignore
.Generate report
Run
rake report
to check the available endpoints and which ones have been tested. At the time of writing this, the script checks the../tests
folder for ocurrences of each endpoint name. The script will generate a Markdown file in../apis_report.md
.There are three main files:
reporter.rb
,Rakefile
andtemplate.erb
. The first one has the code for theElastic::Reporter
class. When it is initialized, it gathers all the API names from the spec (excluding names starting with_
like_common
and_internal
). Then it checks for each API endpoint name, if it's being used in any of the yml files in./tests
. The reporter is initialized in thereport
task in the Rakefile and the result is passed to the ERB template to generate the markdown file and write it to./apis_report.md
.TO-DO:
STACK_VERSION
a variable