mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
libpod API: return proper error status code for pod start
When we failed to do anything we should return 500, the 409 code has a special meaing to the client as it uses a different error format. As such the remote client was not able to unmarshal the error correctly and just returned an empty string. Fixes #22989 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -29,12 +29,7 @@ var _ = Describe("Podman pod start", func() {
|
||||
|
||||
session := podmanTest.Podman([]string{"pod", "start", podid})
|
||||
session.WaitWithDefaultTimeout()
|
||||
expect := fmt.Sprintf("no containers in pod %s have no dependencies, cannot start pod: no such container", podid)
|
||||
if IsRemote() {
|
||||
// FIXME: #22989 no error message
|
||||
expect = "Error:"
|
||||
}
|
||||
Expect(session).Should(ExitWithError(125, expect))
|
||||
Expect(session).Should(ExitWithError(125, fmt.Sprintf("no containers in pod %s have no dependencies, cannot start pod: no such container", podid)))
|
||||
})
|
||||
|
||||
It("podman pod start single pod by name", func() {
|
||||
|
||||
Reference in New Issue
Block a user