From ec5dfce0b13805588b9d310726441c7adb513525 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Sun, 29 Sep 2019 17:00:58 +0300 Subject: [PATCH 1/4] Run tests on Travis CI. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f3e3603a..85193371 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,7 @@ before_script: script: - cargo check --all + - cargo test --all - | if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then cargo clippy From 06c826e772bcd3254cd45e36118a292cd39950fd Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Sun, 29 Sep 2019 17:28:00 +0300 Subject: [PATCH 2/4] Enable Redis in the test environment. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 85193371..25a772c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ language: rust sudo: false dist: trusty +services: + - redis-server + cache: apt: true directories: From 98cac8668c581d48a3c0158ed6e1c5b985375fc5 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Sun, 29 Sep 2019 18:02:38 +0300 Subject: [PATCH 3/4] Run all tests regardless of prior failures. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 25a772c4..68bc4417 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ before_script: script: - cargo check --all - - cargo test --all + - cargo test --all --no-fail-fast - | if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then cargo clippy From 60bd816ed78910de59cd58feb862c108b7cb759b Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Sun, 29 Sep 2019 18:03:03 +0300 Subject: [PATCH 4/4] Fix tests for the template_yarte example. --- template_yarte/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template_yarte/src/main.rs b/template_yarte/src/main.rs index 6a7faa0c..ee4af804 100644 --- a/template_yarte/src/main.rs +++ b/template_yarte/src/main.rs @@ -44,7 +44,7 @@ mod test { assert_eq!( resp.headers().get(http::header::CONTENT_TYPE).unwrap(), - "text/html" + "text/html; charset=utf-8" ); let bytes = atest::read_body(resp); @@ -73,7 +73,7 @@ mod test { assert_eq!( resp.headers().get(http::header::CONTENT_TYPE).unwrap(), - "text/html" + "text/html; charset=utf-8" ); let bytes = atest::read_body(resp); @@ -102,7 +102,7 @@ mod test { assert_eq!( resp.headers().get(http::header::CONTENT_TYPE).unwrap(), - "text/html" + "text/html; charset=utf-8" ); let bytes = atest::read_body(resp);