Change defual retry to zero

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-10-23 18:19:51 +08:00
parent f1428c1446
commit 999e769d29
3 changed files with 8 additions and 8 deletions

View File

@ -133,14 +133,14 @@ func BuildDefaultPushConf() ConfYaml {
// Android
conf.Android.Enabled = false
conf.Android.APIKey = ""
conf.Android.MaxRetry = 1
conf.Android.MaxRetry = 0
// iOS
conf.Ios.Enabled = false
conf.Ios.KeyPath = "key.pem"
conf.Ios.Password = ""
conf.Ios.Production = false
conf.Ios.MaxRetry = 1
conf.Ios.MaxRetry = 0
// log
conf.Log.Format = "string"

View File

@ -23,14 +23,14 @@ api:
android:
enabled: true
apikey: "YOUR_API_KEY"
max_retry: 1
max_retry: 0
ios:
enabled: false
key_path: "key.pem"
password: ""
production: false
max_retry: 1
max_retry: 0
log:
format: "string" # string or json

View File

@ -78,14 +78,14 @@ func (suite *ConfigTestSuite) TestValidateConfDefault() {
// Android
assert.Equal(suite.T(), false, suite.ConfGorushDefault.Android.Enabled)
assert.Equal(suite.T(), "", suite.ConfGorushDefault.Android.APIKey)
assert.Equal(suite.T(), 1, suite.ConfGorushDefault.Android.MaxRetry)
assert.Equal(suite.T(), 0, suite.ConfGorushDefault.Android.MaxRetry)
// iOS
assert.Equal(suite.T(), false, suite.ConfGorushDefault.Ios.Enabled)
assert.Equal(suite.T(), "key.pem", suite.ConfGorushDefault.Ios.KeyPath)
assert.Equal(suite.T(), "", suite.ConfGorushDefault.Ios.Password)
assert.Equal(suite.T(), false, suite.ConfGorushDefault.Ios.Production)
assert.Equal(suite.T(), 1, suite.ConfGorushDefault.Ios.MaxRetry)
assert.Equal(suite.T(), 0, suite.ConfGorushDefault.Ios.MaxRetry)
// log
assert.Equal(suite.T(), "string", suite.ConfGorushDefault.Log.Format)
@ -133,14 +133,14 @@ func (suite *ConfigTestSuite) TestValidateConf() {
// Android
assert.Equal(suite.T(), true, suite.ConfGorush.Android.Enabled)
assert.Equal(suite.T(), "YOUR_API_KEY", suite.ConfGorush.Android.APIKey)
assert.Equal(suite.T(), 1, suite.ConfGorush.Android.MaxRetry)
assert.Equal(suite.T(), 0, suite.ConfGorush.Android.MaxRetry)
// iOS
assert.Equal(suite.T(), false, suite.ConfGorush.Ios.Enabled)
assert.Equal(suite.T(), "key.pem", suite.ConfGorush.Ios.KeyPath)
assert.Equal(suite.T(), "", suite.ConfGorush.Ios.Password)
assert.Equal(suite.T(), false, suite.ConfGorush.Ios.Production)
assert.Equal(suite.T(), 1, suite.ConfGorush.Ios.MaxRetry)
assert.Equal(suite.T(), 0, suite.ConfGorush.Ios.MaxRetry)
// log
assert.Equal(suite.T(), "string", suite.ConfGorush.Log.Format)