diff --git a/libnetwork/libnetwork_linux_test.go b/libnetwork/libnetwork_linux_test.go index a75b2072c2..29f90f6c95 100644 --- a/libnetwork/libnetwork_linux_test.go +++ b/libnetwork/libnetwork_linux_test.go @@ -477,7 +477,7 @@ func externalKeyTest(t *testing.T, reexec bool) { if reexec { err := reexecSetKey("this-must-fail", containerID, controller.ID()) if err == nil { - t.Fatalf("SetExternalKey must fail if the corresponding namespace is not created") + t.Fatalf("libnetwork-setkey must fail if the corresponding namespace is not created") } } else { // Setting an non-existing key (namespace) must fail @@ -500,7 +500,7 @@ func externalKeyTest(t *testing.T, reexec bool) { if reexec { err := reexecSetKey("ValidKey", containerID, controller.ID()) if err != nil { - t.Fatalf("SetExternalKey failed with %v", err) + t.Fatalf("libnetwork-setkey failed with %v", err) } } else { if err := sbox.SetKey("ValidKey"); err != nil { diff --git a/libnetwork/sandbox_externalkey_unix.go b/libnetwork/sandbox_externalkey_unix.go index 968d61ca41..be38f8f807 100644 --- a/libnetwork/sandbox_externalkey_unix.go +++ b/libnetwork/sandbox_externalkey_unix.go @@ -65,11 +65,11 @@ func setKey() error { return err } - return SetExternalKey(shortCtlrID, containerID, fmt.Sprintf("/proc/%d/ns/net", state.Pid), *execRoot) + return setExternalKey(shortCtlrID, containerID, fmt.Sprintf("/proc/%d/ns/net", state.Pid), *execRoot) } -// SetExternalKey provides a convenient way to set an External key to a sandbox -func SetExternalKey(shortCtlrID string, containerID string, key string, execRoot string) error { +// setExternalKey provides a convenient way to set an External key to a sandbox +func setExternalKey(shortCtlrID string, containerID string, key string, execRoot string) error { uds := filepath.Join(execRoot, execSubdir, shortCtlrID+".sock") c, err := net.Dial("unix", uds) if err != nil {