mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
migrate TestAPINetworkInspectWithScope to integration test
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
This commit is contained in:
@@ -2,12 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/moby/moby/v2/internal/testutil"
|
|
||||||
"github.com/moby/moby/v2/internal/testutil/request"
|
|
||||||
"gotest.tools/v3/assert"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DockerAPISuite struct {
|
type DockerAPISuite struct {
|
||||||
@@ -21,9 +16,3 @@ func (s *DockerAPISuite) TearDownTest(ctx context.Context, t *testing.T) {
|
|||||||
func (s *DockerAPISuite) OnTimeout(t *testing.T) {
|
func (s *DockerAPISuite) OnTimeout(t *testing.T) {
|
||||||
s.ds.OnTimeout(t)
|
s.ds.OnTimeout(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerAPISuite) TestAPIOptionsRoute(c *testing.T) {
|
|
||||||
resp, _, err := request.Do(testutil.GetContext(c), "/", request.Method(http.MethodOptions))
|
|
||||||
assert.NilError(c, err)
|
|
||||||
assert.Equal(c, resp.StatusCode, http.StatusOK)
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user