Commit graph

725 commits

Author SHA1 Message Date
Jon Gjengset
cdbc330d77
Just test stable on non-linux
Let's not waste Travis' cycles unnecessarily
2018-11-24 14:17:30 -05:00
Jon Gjengset
64b968cd16
Don't worry that tarpaulin is already installed 2018-11-24 14:17:29 -05:00
Jon Gjengset
d5076883c5
Only require sudo for integration tests 2018-11-24 14:17:29 -05:00
Jon Gjengset
481ace22a6
Also test on Windows! 2018-11-24 14:17:29 -05:00
Jon Gjengset
1eab9c8375
Refine Travis CI build and add rustfmt/clippy
This patch modifies the Travis build pipeline to include multiple
[build stages](https://docs.travis-ci.com/user/build-stages/). CI now
progresses in the following steps:

 - First, `cargo check` is run on `stable` only.
   If it fails, the build is considered failed.
   This is so that we can fail fast for obviously botched commits.
 - Then, unit and doc tests are run for all targets.
   If any non-nightly tests fail, the build fails.
 - Then, integration tests with
   [GreenMail](http://www.icegreen.com/greenmail/) are run on Linux for
   all Rust targets. We can't run them on macOS because it doesn't
   support the Docker service.
   If any non-nightly tests fail, the build fails.
 - Then, `rustfmt` and `clippy` are both run on *beta* and on nightly.
   We use beta instead of stable to try to give ourselves some headroom
   for changes coming down the pike. The lints are only run on Linux,
   because the platform shouldn't matter.
   If any beta lints fail, the build fails.
 - And finally, we generate a coverage report on nightly on Linux.
   This can only run on nightly because tarpaulin requires nightly.
   It's only run on Linux, because we want to include integration tests.
   Note that the coverage stage has its own cache
   (`CACHE_NAME=coverage`) because the only thing it caches is cargo
   tarpaulin (the rust/cargo cache is cleaned before exit).

Fixes #48.
2018-11-24 14:17:29 -05:00
Jon Gjengset
b6e9ea080b
Make crate compile on Rust 1.26.2+ 2018-11-24 14:17:15 -05:00
Jon Gjengset
a610283861
Fix nightly clippy warning 2018-11-24 12:45:07 -05:00
Jon Gjengset
cb9df750fd
Restart test server in case tests aren't reentrant
Specifically, if a test doesn't clean up nicely after itself, running it
a second time for checking coverage might make it fail! We restart the
docker server so that all the server state is erased, which should
mitigate that.
2018-11-24 00:57:07 -05:00
Jon Gjengset
e7e20c08e9
Merge branch 'integration-testing' 2018-11-23 13:55:57 -05:00
Jon Gjengset
6aa7c30167
Quick'n'dirty fix for missing lettre release 2018-11-23 13:55:36 -05:00
Jon Gjengset
c7a6a72ed7
Add is-it-maintained badges
[skip ci]
2018-11-22 22:02:21 -05:00
Jon Gjengset
26d8e8e333
Actually, now it's codecov.io 2018-11-22 20:57:18 -05:00
Jon Gjengset
328144b3f5
Add testing instructions to README 2018-11-22 20:56:42 -05:00
Jon Gjengset
74fc745618
Fix typo 2018-11-22 20:56:42 -05:00
Jon Gjengset
b75e30802a
No need to test --lib twice 2018-11-22 20:56:42 -05:00
Jon Gjengset
9be18cc574
No need to even install coverage on osx 2018-11-22 20:56:42 -05:00
Jon Gjengset
13a5638149
We're using coveralls.io 🤦 2018-11-22 20:56:41 -05:00
Jon Gjengset
9353493139
Make sure tests get run by coverage 2018-11-22 20:56:41 -05:00
Jon Gjengset
3e034585b3
Run Greenmail detched 2018-11-22 20:56:41 -05:00
Jon Gjengset
e52290e8dd
list test isn't done yet 2018-11-22 20:56:41 -05:00
Jon Gjengset
f4e1dc81b5
Only check coverage on stable 2018-11-22 20:56:41 -05:00
Jon Gjengset
b85e4cbe9a
No docker on osx 2018-11-22 20:56:41 -05:00
Jon Gjengset
4d9cd8c49a
Better code coverage maybe? 2018-11-22 20:56:41 -05:00
Jon Gjengset
06106fbc58
Don't run integration tests on appveyor
It is
[possible](https://stefanscherer.github.io/setup-windows-docker-ci-appveyor/)
but I don't want to dig into it atm.
2018-11-22 20:56:41 -05:00
Jon Gjengset
c393fd7162
Add Travis integration testing
This uses [GreenMail's Docker
image](http://www.icegreen.com/greenmail/#deploy_docker_standalone) to
spin up a real SMTP+IMAP server on Travis, and then runs a series of
integration tests against it by sending e-mails using
[`lettre`](https://crates.io/crates/lettre) and checking that we can
receive them correctly.

A start on #101.
2018-11-22 20:56:41 -05:00
Jon Gjengset
8299a6be9d
Bump version for repository move 2018-11-22 20:55:25 -05:00
Jon Gjengset
3fbf52ef54
Bump version for string changes and "" fix 2018-11-22 17:58:38 -05:00
Jon Gjengset
5dc51ac6b1
Show example of how to use store to delete 2018-11-22 17:57:56 -05:00
Jon Gjengset
357603b15f
Empty string != "" 2018-11-22 17:57:41 -05:00
Jon Gjengset
2b17bc0538
Make all public methods generic over str ref 2018-11-22 17:57:05 -05:00
Jon Gjengset
35acfeb108
Fix up README 2018-11-22 14:46:31 -05:00
Jon Gjengset
bce4831ccb
Clippy clean 2018-11-22 14:27:07 -05:00
Jon Gjengset
fc935bf884
Simplify fetch a little 2018-11-22 14:03:29 -05:00
Jon Gjengset
5dd9dfe469
Even more doc updates 2018-11-22 14:00:58 -05:00
Jon Gjengset
f83742dc3d
A significant documentation upgrade
Fixes #77.
Touches on #74.
Fixes #70 through documentation (I think?)
Fixes #62.
2018-11-21 16:37:47 -05:00
Jon Gjengset
bddfab357f
Merge pull request #98 from kmkaplan/issue-95-authenticate-base64
[BUGFIX] Expect a space after the "+" in Client::authenticate.
2018-11-17 11:31:13 -05:00
Kim Minh Kaplan
de5a38366c [BUGFIX] Expect a space after the "+" in Client::authenticate.
RFC 3501: A continue-req from the server starts with "+" SP.
2018-11-17 07:37:33 +00:00
Jon Gjengset
28e4201eb3
Merge pull request #97 from kmkaplan/issue-95-authenticate-base64
imap::client::Client::authenticate: Base64 encode the result of the A…
2018-11-10 16:56:44 -05:00
Kim Minh Kaplan
033c23ef11 Document that Authenticator does the Base64 encoding and decoding. 2018-11-10 09:15:23 +00:00
Kim Minh Kaplan
c2c7e2a3f7 In Authenticator::process change the challenge from a Vec<u8> to a &[u8] 2018-11-10 08:54:46 +00:00
Kim Minh Kaplan
9e0a5d7c8a Escape '+' character in regexp. 2018-11-09 22:35:22 +00:00
Kim Minh Kaplan
892fe49a68 Decode the Base64 AUTHENTICATE challenge 2018-11-09 22:35:22 +00:00
Kim Minh Kaplan
1dd55ff066 Move Authenticator to returning an AsRef<u8>. 2018-11-09 22:35:12 +00:00
Kim Minh Kaplan
93d032181d imap::client::Client::authenticate: Base64 encode the result of the Authenticator.
Fixes issue #95.
2018-11-07 11:05:48 +00:00
Jon Gjengset
36431e11da
Merge pull request #92 from domcorvasce/patch-1
Update native-tls requested version
2018-11-06 09:35:39 -05:00
Jon Gjengset
b45beb88ed
Fix #93; why doesn't this fail for me or CI? 2018-11-03 16:03:32 -04:00
Jon Gjengset
f02950a7b5
Merge pull request #91 from dario23/master
send unsolicited responses to a channel instead of discarding them
2018-11-01 16:54:57 -04:00
Johannes Schilling
8d7b527331 more tests and more handling for unsolicited responses 2018-11-01 21:49:14 +01:00
Johannes Schilling
930bd86dbf pass unsolicited responses channel by reference
as suggested in
https://github.com/mattnenterprise/rust-imap/pull/91#issuecomment-434055085
2018-11-01 21:47:50 +01:00
Johannes Schilling
f98398aecf send unsolicited responses to a channel instead of discarding them
notes

  * i tried to avoid the term "async", because that term is very
    overloaded and we're not using e.g. tokio/async-io here
  * i'm a little unhappy having to string the channel through the
    parser, because that seems rather a part of the client logic than
    parsing. on the other hand it's better than passing the whole
    client, so there's that at least.
2018-11-01 21:46:49 +01:00