[#140] apistatus: Support OBJECT_ALREADY_REMOVED error

Define `ObjectAlreadyRemoved` type for `OBJECT_ALREADY_REMOVED` code.

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

View file

@ -87,6 +87,12 @@ func TestToStatusV2(t *testing.T) {
}),
codeV2: 2049,
},
{
status: (statusConstructor)(func() apistatus.Status {
return new(apistatus.ObjectAlreadyRemoved)
}),
codeV2: 2052,
},
} {
var st apistatus.Status
@ -193,6 +199,12 @@ func TestFromStatusV2(t *testing.T) {
}),
codeV2: 2049,
},
{
status: (statusConstructor)(func() apistatus.Status {
return new(apistatus.ObjectAlreadyRemoved)
}),
codeV2: 2052,
},
} {
var st apistatus.Status