mirror of
https://github.com/AfterShip/email-verifier.git
synced 2025-02-06 10:02:30 +00:00
Test: not use yahoo.com as test cases, for IP would be permanently deferred
This commit is contained in:
parent
28e86400ee
commit
7efaebecee
@ -9,7 +9,7 @@ import (
|
||||
var verifier = NewVerifier().EnableSMTPCheck()
|
||||
|
||||
func TestIsFreeDomain_True(t *testing.T) {
|
||||
domain := "yahoo.com"
|
||||
domain := "gmail.com"
|
||||
|
||||
isFreeDomain := verifier.IsFreeDomain(domain)
|
||||
assert.True(t, isFreeDomain)
|
||||
|
@ -103,14 +103,14 @@ func TestCheckSMTPOK_HostNotExists(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewSMTPClientOK(t *testing.T) {
|
||||
domain := "yahoo.com"
|
||||
domain := "gmail.com"
|
||||
ret, err := newSMTPClient(domain, "")
|
||||
assert.NotNil(t, ret)
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestNewSMTPClientFailed_WithInvalidProxy(t *testing.T) {
|
||||
domain := "yahoo.com"
|
||||
domain := "gmail.com"
|
||||
proxyURI := "socks5://user:password@127.0.0.1:1080?timeout=5s"
|
||||
ret, err := newSMTPClient(domain, proxyURI)
|
||||
assert.Nil(t, ret)
|
||||
|
@ -72,7 +72,7 @@ func TestCheckEmailOK_SMTPHostExists_FreeDomain(t *testing.T) {
|
||||
var (
|
||||
// trueVal = true
|
||||
username = "email_username"
|
||||
domain = "yahoo.com"
|
||||
domain = "gmail.com"
|
||||
address = username + "@" + domain
|
||||
email = address
|
||||
)
|
||||
@ -86,14 +86,14 @@ func TestCheckEmailOK_SMTPHostExists_FreeDomain(t *testing.T) {
|
||||
Valid: true,
|
||||
},
|
||||
HasMxRecords: true,
|
||||
Reachable: reachableUnknown,
|
||||
Reachable: reachableNo,
|
||||
Disposable: false,
|
||||
RoleAccount: false,
|
||||
Free: true,
|
||||
SMTP: &SMTP{
|
||||
HostExists: true,
|
||||
FullInbox: false,
|
||||
CatchAll: true,
|
||||
CatchAll: false,
|
||||
Deliverable: false,
|
||||
Disabled: false,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user