cloudapi: support multiple upload statuses in ComposeStatus
Add the new upload_statuses under the image_status in the result of the ComposeStatus object. The first status is also included in the old top-level 'upload_status' property for backwards compatibility. Tests are updated to match the new results.
This commit is contained in:
parent
ba2240b578
commit
5a93166f6b
2 changed files with 64 additions and 30 deletions
|
|
@ -887,7 +887,15 @@ func TestComposeTargetErrors(t *testing.T) {
|
|||
},
|
||||
"status": "failure",
|
||||
"type": "aws"
|
||||
}
|
||||
},
|
||||
"upload_statuses": [{
|
||||
"options": {
|
||||
"ami": "",
|
||||
"region": ""
|
||||
},
|
||||
"status": "failure",
|
||||
"type": "aws"
|
||||
}]
|
||||
},
|
||||
"status": "failure"
|
||||
}`, jobId, jobId))
|
||||
|
|
@ -1291,7 +1299,15 @@ func TestImageFromCompose(t *testing.T) {
|
|||
"ami": "ami-abc123",
|
||||
"region": "eu-central-1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"upload_statuses": [{
|
||||
"type": "aws",
|
||||
"status": "success",
|
||||
"options": {
|
||||
"ami": "ami-abc123",
|
||||
"region": "eu-central-1"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}`, jobId, jobId))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue