Files
query-orchestration/test/queryService/openapi_test.go
T
Michael McGuinness 0df3d16976 Merged in feature/testwithlogs (pull request #65)
Query Version Sync Runner

* testing

* queryversiosyncworking

* update

* tests

* fixtests
2025-02-14 10:56:24 +00:00

40 lines
960 B
Go

package endtoend_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,
Env: map[string]string{
"JOB_SYNC_URL": "/i/am/here",
"QUERY_VERSION_SYNC_URL": "iamthere",
},
})
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)
}