7001ca854c
Queuing Changes and Cfg Testing * staarting * staarting * startedpush * note * save * mocking * removederrs * fixtests * cleanuperrs * newenvsetup * preppingtests * queue * mmovetocfgpassunittests * sortoutconfig * passinginteg * deps * fixtests
36 lines
848 B
Go
36 lines
848 B
Go
package integration_test
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"net/http"
|
|
"queryorchestration/internal/test"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestQueryServiceOpenAPI(t *testing.T) {
|
|
ctx := context.Background()
|
|
|
|
c, cleanup := test.CreateServiceNetwork(t, ctx, &test.ServiceNetworkConfig{
|
|
Name: test.QueryService,
|
|
})
|
|
defer cleanup()
|
|
|
|
resp, err := http.Get(fmt.Sprintf("%s/swagger/doc.json", c.URI))
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, resp)
|
|
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
|
|
|
resp, err = http.Get(fmt.Sprintf("%s/swagger/doc.yaml", c.URI))
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, resp)
|
|
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
|
|
|
resp, err = http.Get(fmt.Sprintf("%s/swagger/index.html", c.URI))
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, resp)
|
|
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
|
}
|