elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
12 stars 73 forks source link

[ENHANCEMENT] Implement YAML test runner #19

Closed russcam closed 4 years ago

russcam commented 4 years ago

In a similar vein to other official clients, a YAML test runner should be implemented, to run the YAML spec tests.

Possible implementation

  1. Create a tests directory in elasticsearch crate for integration tests
  2. Use the yaml-rust crate to read YML files.
  3. Use the quote crate and quote! macro to generate client calls to pass to the compiler based on calls defined within the YML test. The macro could generate a function that is called from another function containing the assertions, or quote! may be used to generate the entire test.