1
0
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:
Daniel Mieg 2023-11-13 21:17:49 +01:00 committed by GitHub
parent 2a98742f43
commit 6e2ecefc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -86,6 +86,7 @@ func TestPollEntity(t *testing.T) {
logResultError,
`{"d" : { "status" : "E" } }`,
`{"d" : { "status" : "R" } }`,
`{"d" : { "status" : "Q" } }`,
},
Token: "myToken",
StatusCode: 200,