first run at integ test using docker-compose
This commit is contained in:
@@ -28,7 +28,7 @@ func addMiddleware(mux *chi.Mux) {
|
||||
|
||||
func addRoutes(mux *chi.Mux) {
|
||||
// Add a simple resource
|
||||
mux.Mount("/app", AppResource{}.Routes())
|
||||
mux.Mount("/api/id", AppResource{}.Routes())
|
||||
// Live a healthy life!
|
||||
mux.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("yolo"))
|
||||
|
||||
@@ -17,7 +17,7 @@ func TestGetRoute(t *testing.T) {
|
||||
ts := httptest.NewServer(r)
|
||||
defer ts.Close()
|
||||
rx := Response{}
|
||||
_, resp := testRequest(t, ts, "GET", "/app/1", nil)
|
||||
_, resp := testRequest(t, ts, "GET", "/api/id/1", nil)
|
||||
err := json.Unmarshal([]byte(resp), &rx)
|
||||
if err != nil {
|
||||
t.Fatalf("Response incorrect form ", resp)
|
||||
|
||||
Reference in New Issue
Block a user