Post migration assertion fixes

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c9e52bd0da0461e605a3678b85702f83081504a7
Component: engine
This commit is contained in:
Daniel Nephin
2018-03-16 11:03:46 -04:00
parent 60daf5fa97
commit 0331f04e35
23 changed files with 184 additions and 136 deletions
+2 -5
View File
@@ -15,7 +15,6 @@ import (
"github.com/docker/docker/pkg/plugins/transport"
"github.com/docker/go-connections/tlsconfig"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
"github.com/pkg/errors"
)
@@ -55,7 +54,6 @@ func testActive(t *testing.T, p *Plugin) {
t.Fatalf("%s:%d: deadlock in waitActive", filepath.Base(f), l)
case <-done:
}
}
func TestGet(t *testing.T) {
@@ -79,12 +77,11 @@ func TestGet(t *testing.T) {
// check negative case where plugin fruit doesn't implement banana
_, err = Get("fruit", "banana")
assert.Check(t, is.DeepEqual(errors.Cause(err), ErrNotImplements))
assert.Equal(t, errors.Cause(err), ErrNotImplements)
// check negative case where plugin vegetable doesn't exist
_, err = Get("vegetable", "potato")
assert.Check(t, is.DeepEqual(errors.Cause(err), ErrNotFound))
assert.Equal(t, errors.Cause(err), ErrNotFound)
}
func TestPluginWithNoManifest(t *testing.T) {