You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-06 09:09:19 +02:00
Abap relese confirm fault tollerant (#3916)
* no error if package release fails
This commit is contained in:
@@ -322,12 +322,13 @@ type AbapBinding struct {
|
||||
|
||||
// ClientMock contains information about the client mock
|
||||
type ClientMock struct {
|
||||
Token string
|
||||
Body string
|
||||
BodyList []string
|
||||
StatusCode int
|
||||
Error error
|
||||
NilResponse bool
|
||||
Token string
|
||||
Body string
|
||||
BodyList []string
|
||||
StatusCode int
|
||||
Error error
|
||||
NilResponse bool
|
||||
ErrorInsteadOfDump bool
|
||||
}
|
||||
|
||||
// SetOptions sets clientOptions for a client mock
|
||||
@@ -344,6 +345,9 @@ func (c *ClientMock) SendRequest(method, url string, bdy io.Reader, hdr http.Hea
|
||||
if c.Body != "" {
|
||||
body = []byte(c.Body)
|
||||
} else {
|
||||
if c.ErrorInsteadOfDump && len(c.BodyList) == 0 {
|
||||
return nil, errors.New("No more bodies in the list")
|
||||
}
|
||||
bodyString := c.BodyList[len(c.BodyList)-1]
|
||||
c.BodyList = c.BodyList[:len(c.BodyList)-1]
|
||||
body = []byte(bodyString)
|
||||
|
||||
Reference in New Issue
Block a user