Add myself to command/stack codeowners

Cleanup a test

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2017-07-20 12:05:20 -04:00
parent 45a7e1ca87
commit 60991e943b
2 changed files with 3 additions and 8 deletions

1
.github/CODEOWNERS vendored
View File

@ -1,6 +1,7 @@
# Github code owners
# See https://github.com/blog/2392-introducing-code-owners
cli/command/stack/** @dnephin @vdemeester
cli/compose/** @dnephin @vdemeester
contrib/completion/bash/** @albers
contrib/completion/zsh/** @sdurrheimer

View File

@ -42,8 +42,6 @@ func (n notFound) NotFound() bool {
func TestValidateExternalNetworks(t *testing.T) {
var testcases = []struct {
inspected bool
noInspect bool
inspectResponse types.NetworkResource
inspectError error
expectedMsg string
@ -58,7 +56,7 @@ func TestValidateExternalNetworks(t *testing.T) {
expectedMsg: "Unexpected",
},
{
noInspect: true,
inspectError: errors.New("host net does not exist on swarm classic"),
network: "host",
},
{
@ -74,15 +72,11 @@ func TestValidateExternalNetworks(t *testing.T) {
for _, testcase := range testcases {
fakeClient := &network.FakeClient{
NetworkInspectFunc: func(_ context.Context, _ string, _ types.NetworkInspectOptions) (types.NetworkResource, error) {
testcase.inspected = true
return testcase.inspectResponse, testcase.inspectError
},
}
networks := []string{testcase.network}
err := validateExternalNetworks(context.Background(), fakeClient, networks)
if testcase.noInspect && testcase.inspected {
assert.Fail(t, "expected no network inspect operation but one occurent")
}
if testcase.expectedMsg == "" {
assert.NoError(t, err)
} else {