]> source.dussan.org Git - gitea.git/commitdiff
Make integration tests more user-friendly (#2536)
authorEthan Koenig <ethantkoenig@gmail.com>
Mon, 18 Sep 2017 08:35:42 +0000 (01:35 -0700)
committerLunny Xiao <xiaolunwen@gmail.com>
Mon, 18 Sep 2017 08:35:42 +0000 (16:35 +0800)
integrations/integration_test.go

index e18be523cbb2a11a8ec4cc7c6a7fbbec573004c1..bfe5cef93db8308e878216f511411d19a220866d 100644 (file)
@@ -74,6 +74,10 @@ func initIntegrationTest() {
                os.Exit(1)
        }
        setting.AppPath = path.Join(giteaRoot, "gitea")
+       if _, err := os.Stat(setting.AppPath); err != nil {
+               fmt.Printf("Could not find gitea binary at %s\n", setting.AppPath)
+               os.Exit(1)
+       }
 
        giteaConf := os.Getenv("GITEA_CONF")
        if giteaConf == "" {
@@ -276,7 +280,7 @@ func MakeRequest(t testing.TB, req *http.Request, expectedStatus int) *TestRespo
        mac.ServeHTTP(respWriter, req)
        if expectedStatus != NoExpectedStatus {
                assert.EqualValues(t, expectedStatus, respWriter.HeaderCode,
-                       "Request URL: %s %s", req.URL.String(), buffer.String())
+                       "Request URL: %s", req.URL.String())
        }
        return &TestResponse{
                HeaderCode: respWriter.HeaderCode,