compare error output in tagstore unit test

Signed-off-by: xiekeyang <xiekeyang@huawei.com>
This commit is contained in:
xiekeyang 2016-02-22 15:24:49 +08:00
parent ad1b181291
commit d58188c4d7

View file

@ -98,8 +98,9 @@ func TestTagStoreUnTag(t *testing.T) {
t.Error(err)
}
errExpect := distribution.ErrTagUnknown{Tag: "latest"}.Error()
_, err = tags.Get(ctx, "latest")
if err == nil {
if err == nil || err.Error() != errExpect {
t.Error("Expected error getting untagged tag")
}
}