feat(grpc): initial grpc server. (#253)

* feat(grpc): initial grpc server.

* refactor(vendor): add missing vendor.

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2017-07-24 15:06:23 +08:00
committed by GitHub
parent 478e39ec65
commit 9a52f8f2b5
102 changed files with 21796 additions and 441 deletions

View File

@@ -126,5 +126,5 @@ Retry:
goto Retry
}
return true
return !isError
}

View File

@@ -475,7 +475,7 @@ func TestPushToAndroidWrongToken(t *testing.T) {
}
success := PushToAndroid(req)
assert.True(t, success)
assert.False(t, success)
}
func TestPushToAndroidRightTokenForJSONLog(t *testing.T) {
@@ -489,7 +489,7 @@ func TestPushToAndroidRightTokenForJSONLog(t *testing.T) {
androidToken := os.Getenv("ANDROID_TEST_TOKEN")
req := PushNotification{
Tokens: []string{androidToken, "bbbbb"},
Tokens: []string{androidToken},
Platform: PlatFormAndroid,
Message: "Welcome",
}
@@ -513,7 +513,7 @@ func TestPushToAndroidRightTokenForStringLog(t *testing.T) {
}
success := PushToAndroid(req)
assert.True(t, success)
assert.False(t, success)
}
func TestOverwriteAndroidAPIKey(t *testing.T) {