Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ff9708f43 |
@@ -150,6 +150,9 @@ func NewRuntimeObject(runtime map[string]interface{}) *RuntimeObject {
|
||||
if runtime["httpClient"] != nil {
|
||||
runtimeObject.HttpClient = runtime["httpClient"].(HttpClient)
|
||||
}
|
||||
if runtime["retryOptions"] != nil {
|
||||
runtimeObject.RetryOptions = runtime["retryOptions"].(*RetryOptions)
|
||||
}
|
||||
return runtimeObject
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,12 @@ var runtimeObj = map[string]interface{}{
|
||||
"listener": &Progresstest{},
|
||||
"tracker": &utils.ReaderTracker{CompletedBytes: int64(10)},
|
||||
"logger": utils.NewLogger("info", "", &bytes.Buffer{}, "{time}"),
|
||||
"retryOptions": &RetryOptions{
|
||||
Retryable: true,
|
||||
RetryCondition: []*RetryCondition{
|
||||
{MaxAttempts: 3, Exception: []string{"AErr"}, ErrorCode: []string{"A1Err"}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
var key = `-----BEGIN RSA PRIVATE KEY-----
|
||||
@@ -193,6 +199,10 @@ func TestRuntimeObject(t *testing.T) {
|
||||
|
||||
runtimeobject = NewRuntimeObject(runtimeObj)
|
||||
utils.AssertEqual(t, false, BoolValue(runtimeobject.IgnoreSSL))
|
||||
|
||||
utils.AssertEqual(t, true, runtimeobject.RetryOptions.Retryable)
|
||||
|
||||
utils.AssertEqual(t, 1, len(runtimeobject.RetryOptions.RetryCondition))
|
||||
}
|
||||
|
||||
func TestSDKError(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user