transport-helper: report errors properly
[gitweb.git] / t / t5801-remote-helpers.sh
index f387027c05cf502c6892c7694598bef34376be92..aafc46ac94a565f6668fdc95824a12ec3167429e 100755 (executable)
@@ -166,4 +166,24 @@ test_expect_success 'push ref with existing object' '
        compare_refs local dup server dup
 '
 
+test_expect_success 'proper failure checks for fetching' '
+       (GIT_REMOTE_TESTGIT_FAILURE=1 &&
+       export GIT_REMOTE_TESTGIT_FAILURE &&
+       cd local &&
+       test_must_fail git fetch 2> error &&
+       cat error &&
+       grep -q "Error while running fast-import" error
+       )
+'
+
+test_expect_success 'proper failure checks for pushing' '
+       (GIT_REMOTE_TESTGIT_FAILURE=1 &&
+       export GIT_REMOTE_TESTGIT_FAILURE &&
+       cd local &&
+       test_must_fail git push --all 2> error &&
+       cat error &&
+       grep -q "Reading from remote helper failed" error
+       )
+'
+
 test_done