-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add debug information about each email verification (#1391)
* Add time and server_ip * Add server_name * Fix tests * clippy * Update openapi
- Loading branch information
1 parent
409798f
commit 3ea6e66
Showing
12 changed files
with
244 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ use reacher_backend::routes::create_routes; | |
use warp::http::StatusCode; | ||
use warp::test::request; | ||
|
||
const FOO_BAR_RESPONSE: &str = r#"{"input":"foo@bar","is_reachable":"invalid","misc":{"is_disposable":false,"is_role_account":false,"gravatar_url":null,"haveibeenpwned":null},"mx":{"accepts_mail":false,"records":[]},"smtp":{"can_connect_smtp":false,"has_full_inbox":false,"is_catch_all":false,"is_deliverable":false,"is_disabled":false},"syntax":{"address":null,"domain":"","is_valid_syntax":false,"username":"","normalized_email":null,"suggestion":null}}"#; | ||
const FOO_BAR_BAZ_RESPONSE: &str = r#"{"input":"[email protected]","is_reachable":"invalid","misc":{"is_disposable":false,"is_role_account":false,"gravatar_url":null,"haveibeenpwned":null},"mx":{"accepts_mail":false,"records":[]},"smtp":{"can_connect_smtp":false,"has_full_inbox":false,"is_catch_all":false,"is_deliverable":false,"is_disabled":false},"syntax":{"address":"[email protected]","domain":"bar.baz","is_valid_syntax":true,"username":"foo","normalized_email":"[email protected]","suggestion":null}}"#; | ||
const FOO_BAR_RESPONSE: &str = r#"{"input":"foo@bar","is_reachable":"invalid","misc":{"is_disposable":false,"is_role_account":false,"gravatar_url":null,"haveibeenpwned":null},"mx":{"accepts_mail":false,"records":[]},"smtp":{"can_connect_smtp":false,"has_full_inbox":false,"is_catch_all":false,"is_deliverable":false,"is_disabled":false,"method":"Skipped"},"syntax":{"address":null,"domain":"","is_valid_syntax":false,"username":"","normalized_email":null,"suggestion":null}"#; | ||
const FOO_BAR_BAZ_RESPONSE: &str = r#"{"input":"[email protected]","is_reachable":"invalid","misc":{"is_disposable":false,"is_role_account":false,"gravatar_url":null,"haveibeenpwned":null},"mx":{"accepts_mail":false,"records":[]},"smtp":{"can_connect_smtp":false,"has_full_inbox":false,"is_catch_all":false,"is_deliverable":false,"is_disabled":false,"method":"Skipped"},"syntax":{"address":"[email protected]","domain":"bar.baz","is_valid_syntax":true,"username":"foo","normalized_email":"[email protected]","suggestion":null}"#; | ||
|
||
#[tokio::test] | ||
async fn test_input_foo_bar() { | ||
|
@@ -39,7 +39,8 @@ async fn test_input_foo_bar() { | |
.await; | ||
|
||
assert_eq!(resp.status(), StatusCode::OK, "{:?}", resp.body()); | ||
assert_eq!(resp.body(), FOO_BAR_RESPONSE); | ||
println!("{:?}", resp.body()); | ||
assert!(resp.body().starts_with(FOO_BAR_RESPONSE.as_bytes())); | ||
} | ||
|
||
#[tokio::test] | ||
|
@@ -55,7 +56,7 @@ async fn test_input_foo_bar_baz() { | |
.await; | ||
|
||
assert_eq!(resp.status(), StatusCode::OK, "{:?}", resp.body()); | ||
assert_eq!(resp.body(), FOO_BAR_BAZ_RESPONSE); | ||
assert!(resp.body().starts_with(FOO_BAR_BAZ_RESPONSE.as_bytes())); | ||
} | ||
|
||
#[tokio::test] | ||
|
@@ -102,7 +103,7 @@ async fn test_reacher_secret_correct_secret() { | |
.await; | ||
|
||
assert_eq!(resp.status(), StatusCode::OK, "{:?}", resp.body()); | ||
assert_eq!(resp.body(), FOO_BAR_RESPONSE); | ||
assert!(resp.body().starts_with(FOO_BAR_RESPONSE.as_bytes())); | ||
} | ||
|
||
#[tokio::test] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.