assert.Equal(t,3,httpmock.GetTotalCallCount(),"unexpected number of requests")
})
}
constresponseCeTaskError=`{
"errors":[
{
"msg":"No activity found for task 'AXDj5ZWQ_ZJrW2xGuBWl'"
}
]
}`
constresponseCeTaskPending=`{
"task":{
"id":"AXe5y_ZMPMpzvP5DRxw_",
"type":"REPORT",
"componentId":"AW8jANn5v4pDRYwyZIiM",
"componentKey":"Piper-Validation/Golang",
"componentName":"Piper-Validation: Golang",
"componentQualifier":"TRK",
"analysisId":"AXe5y_mgcqEbAZBpFc0V",
"status":"PENDING",
"submittedAt":"2021-02-19T10:18:07+0000",
"submitterLogin":"CCFenner",
"startedAt":"2021-02-19T10:18:08+0000",
"executedAt":"2021-02-19T10:18:09+0000",
"executionTimeMs":551,
"logs":false,
"hasScannerContext":true,
"organization":"default-organization",
"warningCount":1,
"warnings":[]
}
}`
constresponseCeTaskProcessing=`{
"task":{
"id":"AXe5y_ZMPMpzvP5DRxw_",
"type":"REPORT",
"componentId":"AW8jANn5v4pDRYwyZIiM",
"componentKey":"Piper-Validation/Golang",
"componentName":"Piper-Validation: Golang",
"componentQualifier":"TRK",
"analysisId":"AXe5y_mgcqEbAZBpFc0V",
"status":"IN_PROGRESS",
"submittedAt":"2021-02-19T10:18:07+0000",
"submitterLogin":"CCFenner",
"startedAt":"2021-02-19T10:18:08+0000",
"executedAt":"2021-02-19T10:18:09+0000",
"executionTimeMs":551,
"logs":false,
"hasScannerContext":true,
"organization":"default-organization",
"warningCount":1,
"warnings":[]
}
}`
constresponseCeTaskSuccess=`{
"task":{
"id":"AXe5y_ZMPMpzvP5DRxw_",
"type":"REPORT",
"componentId":"AW8jANn5v4pDRYwyZIiM",
"componentKey":"Piper-Validation/Golang",
"componentName":"Piper-Validation: Golang",
"componentQualifier":"TRK",
"analysisId":"AXe5y_mgcqEbAZBpFc0V",
"status":"SUCCESS",
"submittedAt":"2021-02-19T10:18:07+0000",
"submitterLogin":"CCFenner",
"startedAt":"2021-02-19T10:18:08+0000",
"executedAt":"2021-02-19T10:18:09+0000",
"executionTimeMs":551,
"logs":false,
"hasScannerContext":true,
"organization":"default-organization",
"warningCount":1,
"warnings":[
"The project key ‘Piper-Validation/Golang’ contains invalid characters. Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit. You should update the project key with the expected format."
]
}
}`
constresponseCeTaskFailure=`{
"task":{
"organization":"my-org-1",
"id":"AVAn5RKqYwETbXvgas-I",
"type":"REPORT",
"componentId":"AVAn5RJmYwETbXvgas-H",
"componentKey":"project_1",
"componentName":"Project One",
"componentQualifier":"TRK",
"analysisId":"123456",
"status":"FAILED",
"submittedAt":"2015-10-02T11:32:15+0200",
"startedAt":"2015-10-02T11:32:16+0200",
"executedAt":"2015-10-02T11:32:22+0200",
"executionTimeMs":5286,
"errorMessage":"Fail to extract report AVaXuGAi_te3Ldc_YItm from database",
"logs":false,
"hasErrorStacktrace":true,
"errorStacktrace":"java.lang.IllegalStateException: Fail to extract report AVaXuGAi_te3Ldc_YItm from database\n\tat org.sonar.server.computation.task.projectanalysis.step.ExtractReportStep.execute(ExtractReportStep.java:50)",