Merge pull request #8236 from jwhonce/jira/run-976

Update CI tests to run python docker library against API
This commit is contained in:
OpenShift Merge Robot
2020-11-09 20:08:29 +00:00
committed by GitHub
21 changed files with 684 additions and 561 deletions

View File

@ -54,6 +54,9 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
return
}
// Add the container name to the input struct
input.Name = query.Name
// Take input structure and convert to cliopts
cliOpts, args, err := common.ContainerCreateToContainerCLIOpts(input, rtc.Engine.CgroupManager)
if err != nil {
@ -65,6 +68,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "fill out specgen"))
return
}
ic := abi.ContainerEngine{Libpod: runtime}
report, err := ic.ContainerCreate(r.Context(), sg)
if err != nil {

View File

@ -14,6 +14,5 @@ func UnsupportedHandler(w http.ResponseWriter, r *http.Request) {
msg := fmt.Sprintf("Path %s is not supported", r.URL.Path)
log.Infof("Request Failed: %s", msg)
utils.WriteJSON(w, http.StatusInternalServerError,
entities.ErrorModel{Message: msg})
utils.WriteJSON(w, http.StatusNotFound, entities.ErrorModel{Message: msg})
}