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", }, }) 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) }