mirror of
https://github.com/moby/moby.git
synced 2025-08-01 05:47:11 +03:00
Use golang.org/x/net/context in api/server/
This patch removes the internal context package and uses golang's package instead. Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/context"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func TestMiddlewares(t *testing.T) {
|
||||
@ -19,12 +19,9 @@ func TestMiddlewares(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
localHandler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
||||
if ctx.Version() == "" {
|
||||
if versionFromContext(ctx) == "" {
|
||||
t.Fatalf("Expected version, got empty string")
|
||||
}
|
||||
if ctx.RequestID() == "" {
|
||||
t.Fatalf("Expected request-id, got empty string")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user