
We previously didn't really had any structure in our project apart from creating a new folder for each package in our project root. Now that we have accumulated some packages, we use the well-known Golang project layout in order to clearly communicate our intent with packages. See https://github.com/golang-standards/project-layout
17 lines
443 B
Go
17 lines
443 B
Go
package e2e
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"gitlab.hpi.de/codeocean/codemoon/poseidon/internal/api"
|
|
"gitlab.hpi.de/codeocean/codemoon/poseidon/tests/helpers"
|
|
"net/http"
|
|
"testing"
|
|
)
|
|
|
|
func TestHealthRoute(t *testing.T) {
|
|
resp, err := http.Get(helpers.BuildURL(api.BasePath, api.HealthPath))
|
|
if assert.NoError(t, err) {
|
|
assert.Equal(t, http.StatusNoContent, resp.StatusCode, "The response code should be NoContent")
|
|
}
|
|
}
|