Return not exist error in metadata store

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-05-15 16:22:06 +00:00
parent c484046261
commit 2d2fcedf24
14 changed files with 134 additions and 52 deletions

View File

@@ -111,7 +111,8 @@ func TestRemovePodSandbox(t *testing.T) {
_, err = c.sandboxIDIndex.Get(testID)
assert.Error(t, err, "sandbox id should be removed")
meta, err := c.sandboxStore.Get(testID)
assert.NoError(t, err)
assert.Error(t, err)
assert.True(t, metadata.IsNotExistError(err))
assert.Nil(t, meta, "sandbox metadata should be removed")
res, err = c.RemovePodSandbox(context.Background(), &runtime.RemovePodSandboxRequest{
PodSandboxId: testID,