mirror of
https://github.com/moby/moby.git
synced 2026-01-10 18:21:35 +00:00
Merge pull request #51585 from 2003Aditya/TestAPIOptionsRoute
migrate TestAPIOptionsRoute to integration test
This commit is contained in:
@@ -2,12 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/moby/moby/v2/internal/testutil"
|
||||
"github.com/moby/moby/v2/internal/testutil/request"
|
||||
"gotest.tools/v3/assert"
|
||||
)
|
||||
|
||||
type DockerAPISuite struct {
|
||||
@@ -21,9 +16,3 @@ func (s *DockerAPISuite) TearDownTest(ctx context.Context, t *testing.T) {
|
||||
func (s *DockerAPISuite) OnTimeout(t *testing.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