aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plumbing/format/packfile/encoder_advanced_test.go9
-rw-r--r--repository_test.go13
-rw-r--r--submodule_test.go17
-rw-r--r--worktree_test.go9
4 files changed, 48 insertions, 0 deletions
diff --git a/plumbing/format/packfile/encoder_advanced_test.go b/plumbing/format/packfile/encoder_advanced_test.go
index 1075875..8cc7180 100644
--- a/plumbing/format/packfile/encoder_advanced_test.go
+++ b/plumbing/format/packfile/encoder_advanced_test.go
@@ -3,6 +3,7 @@ package packfile_test
import (
"bytes"
"math/rand"
+ "testing"
"gopkg.in/src-d/go-git.v4/plumbing"
. "gopkg.in/src-d/go-git.v4/plumbing/format/packfile"
@@ -21,6 +22,10 @@ type EncoderAdvancedSuite struct {
var _ = Suite(&EncoderAdvancedSuite{})
func (s *EncoderAdvancedSuite) TestEncodeDecode(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
fixs := fixtures.Basic().ByTag("packfile").ByTag(".git")
fixs = append(fixs, fixtures.ByURL("https://github.com/src-d/go-git.git").
ByTag("packfile").ByTag(".git").One())
@@ -33,6 +38,10 @@ func (s *EncoderAdvancedSuite) TestEncodeDecode(c *C) {
}
func (s *EncoderAdvancedSuite) TestEncodeDecodeNoDeltaCompression(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
fixs := fixtures.Basic().ByTag("packfile").ByTag(".git")
fixs = append(fixs, fixtures.ByURL("https://github.com/src-d/go-git.git").
ByTag("packfile").ByTag(".git").One())
diff --git a/repository_test.go b/repository_test.go
index 1ad1607..f39f358 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -10,6 +10,7 @@ import (
"os/exec"
"path/filepath"
"strings"
+ "testing"
"time"
"gopkg.in/src-d/go-git.v4/config"
@@ -430,6 +431,10 @@ func (s *RepositorySuite) TestPlainCloneContext(c *C) {
}
func (s *RepositorySuite) TestPlainCloneWithRecurseSubmodules(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
dir, err := ioutil.TempDir("", "plain-clone-submodule")
c.Assert(err, IsNil)
defer os.RemoveAll(dir)
@@ -1396,10 +1401,18 @@ func (s *RepositorySuite) testRepackObjects(
}
func (s *RepositorySuite) TestRepackObjects(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
s.testRepackObjects(c, time.Time{}, 1)
}
func (s *RepositorySuite) TestRepackObjectsWithNoDelete(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
s.testRepackObjects(c, time.Unix(0, 1), 3)
}
diff --git a/submodule_test.go b/submodule_test.go
index bea5a0f..7c97179 100644
--- a/submodule_test.go
+++ b/submodule_test.go
@@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
+ "testing"
"gopkg.in/src-d/go-git.v4/plumbing"
@@ -66,6 +67,10 @@ func (s *SubmoduleSuite) TestInit(c *C) {
}
func (s *SubmoduleSuite) TestUpdate(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
sm, err := s.Worktree.Submodule("basic")
c.Assert(err, IsNil)
@@ -118,6 +123,10 @@ func (s *SubmoduleSuite) TestUpdateWithNotFetch(c *C) {
}
func (s *SubmoduleSuite) TestUpdateWithRecursion(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
sm, err := s.Worktree.Submodule("itself")
c.Assert(err, IsNil)
@@ -134,6 +143,10 @@ func (s *SubmoduleSuite) TestUpdateWithRecursion(c *C) {
}
func (s *SubmoduleSuite) TestUpdateWithInitAndUpdate(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
sm, err := s.Worktree.Submodule("basic")
c.Assert(err, IsNil)
@@ -193,6 +206,10 @@ func (s *SubmoduleSuite) TestSubmodulesStatus(c *C) {
}
func (s *SubmoduleSuite) TestSubmodulesUpdateContext(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
sm, err := s.Worktree.Submodules()
c.Assert(err, IsNil)
diff --git a/worktree_test.go b/worktree_test.go
index cb2e5e2..b3e0a1a 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -8,6 +8,7 @@ import (
"path/filepath"
"regexp"
"runtime"
+ "testing"
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing"
@@ -196,6 +197,10 @@ func (s *WorktreeSuite) TestPullProgress(c *C) {
}
func (s *WorktreeSuite) TestPullProgressWithRecursion(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
path := fixtures.ByTag("submodule").One().Worktree().Root()
dir, err := ioutil.TempDir("", "plain-clone-submodule")
@@ -613,6 +618,10 @@ func (s *WorktreeSuite) TestCheckoutTag(c *C) {
}
func (s *WorktreeSuite) TestCheckoutBisect(c *C) {
+ if testing.Short() {
+ c.Skip("skipping test in short mode.")
+ }
+
s.testCheckoutBisect(c, "https://github.com/src-d/go-git.git")
}