mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-21 19:48:53 +02:00
Add scheduled status (#4668)
* Add scheduled status * Add test * Improve log output
This commit is contained in:
parent
2a98742f43
commit
6e2ecefc2f
@ -32,8 +32,8 @@ func PollEntity(repositoryName string, connectionDetails ConnectionDetailsHTTP,
|
||||
return status, err
|
||||
}
|
||||
status = pullEntity.Status
|
||||
log.Entry().WithField("StatusCode", responseStatus).Info("Status: " + pullEntity.StatusDescription)
|
||||
if pullEntity.Status != "R" {
|
||||
log.Entry().WithField("StatusCode", responseStatus).Info("Status: " + pullEntity.Status + " - " + pullEntity.StatusDescription)
|
||||
if pullEntity.Status != "R" && pullEntity.Status != "Q" {
|
||||
|
||||
PrintLogs(repositoryName, connectionDetails, client)
|
||||
break
|
||||
|
@ -86,6 +86,7 @@ func TestPollEntity(t *testing.T) {
|
||||
logResultError,
|
||||
`{"d" : { "status" : "E" } }`,
|
||||
`{"d" : { "status" : "R" } }`,
|
||||
`{"d" : { "status" : "Q" } }`,
|
||||
},
|
||||
Token: "myToken",
|
||||
StatusCode: 200,
|
||||
|
Loading…
x
Reference in New Issue
Block a user