Merged in feature/docresult (pull request #105)
Document Result Endpoint * testing * cleantesting * progress * query * lint * readme * dockerclient * api * passtest * tests * test
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package endtoend_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"queryorchestration/internal/test"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestQueryAPIAccessories(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
c, cleanup := test.CreateAPINetwork(t, ctx, &test.ServiceNetworkConfig{
|
||||
API: test.QueryAPI,
|
||||
})
|
||||
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)
|
||||
|
||||
resp, err = http.Get(fmt.Sprintf("%s/metrics", c.URI))
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, resp)
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
}
|
||||
Reference in New Issue
Block a user