[#140] apistatus: Support CONTAINER_NOT_FOUND error

Define `ContainerNotFound` type for `CONTAINER_NOT_FOUND` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-28 11:55:25 +03:00 committed by LeL
parent f1e46d35de
commit c627648798
3 changed files with 55 additions and 0 deletions

View file

@ -93,6 +93,12 @@ func TestToStatusV2(t *testing.T) {
}),
codeV2: 2052,
},
{
status: (statusConstructor)(func() apistatus.Status {
return new(apistatus.ContainerNotFound)
}),
codeV2: 3072,
},
} {
var st apistatus.Status
@ -205,6 +211,12 @@ func TestFromStatusV2(t *testing.T) {
}),
codeV2: 2052,
},
{
status: (statusConstructor)(func() apistatus.Status {
return new(apistatus.ContainerNotFound)
}),
codeV2: 3072,
},
} {
var st apistatus.Status