Rocket: Every example should have a test suite

Created on 27 Dec 2016  路  13Comments  路  Source: SergioBenitez/Rocket

At present, only about 25% of the crates in examples/ have a test suite. The ideal, of course, is 100%. This is particularly important for examples as they can serve as a measure of understanding for new users. Let's get to 100%.

Below is a list of all of the examples. Those checked off have a complete test suite, while those that aren't do not.

  • [X] config
  • [X] content_types
  • [X] cookies
  • [X] errors
  • [x] extended_validation
  • [X] fairings
  • [x] form_kitchen_sink
  • [X] forms
  • [X] from_request
  • [X] handlebars_templates
  • [X] hello_alt_methods
  • [X] hello_person
  • [X] hello_ranks
  • [X] hello_world
  • [X] json
  • [X] managed_queue
  • [X] manual_routes
  • [X] optional_redirect
  • [X] optional_result
  • [X] pastebin
  • [X] query_params
  • [x] raw_upload
  • [X] redirect
  • [X] state
  • [X] static_files
  • [x] stream
  • [x] state
  • [X] testing
  • [X] todo

This is a great opportunity for those looking to contribute. If you'd like to write a test suite for an example, please comment with the example's name and expected time of completion. The example will be annotated as "in progress". This will prevent overlapping work. Use the existing test suites as a basis for writing new tests; consistency is important.

P.S: While working on the test suites, be sure to record your experience with the testing library. I'd like for testing in Rocket to be a simple, straightforward, and enjoyable experience. Your feedback is essential to making this happen.

enhancement help wanted

All 13 comments

@SergioBenitez I can do testing on the query_params example. I expect to have it completed by Friday.

@SergioBenitez I can take on the optional_redirect and optional_result examples, with the expectation that they will be complete by the end of tomorrow (12/28/2016).

@SergioBenitez I can write tests for the redirect example. I expect it to be completed before 10:00pm (UTC) on Thursday (12/29/2016).

@SergioBenitez I will submit a PR for the cookies example shortly!

@SergioBenitez I will write a test for the hello_alt_methods example 馃憤

@SergioBenitez I will write the test for the manual_routes by Monday (01/09/2016)

@SergioBenitez I would like to pick up the extended_validation test, if no one has working on this yet.
It should be finished before this weekend.

@mike820324 It's yours! :)

I'm can have a go at the raw_upload example

Todo
EDIT (18.04.2017): Working on it

@AtomicBit Awesome! Thank you! :)

I've done just one test for form_kitchen_sink in PR289

Once #289 is merged, we can close this issue! 馃帀

Was this page helpful?
0 / 5 - 0 ratings