Merged in feature/e2etest (pull request #74)
Feature/e2etest * e2etest * testcleanups
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package endtoend_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"queryorchestration/internal/test"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestQueryServiceAccessories(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)
|
||||
|
||||
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