aboutsummaryrefslogblamecommitdiffstats
path: root/plumbing/transport/ssh/fetch_pack_test.go
blob: a0321b319f4603c50c97966bf2d8702e069b32a1 (plain) (tree)
1
2
3
4
5
6
7


           

            
                                                     
                                                          




                             
                           




                                           


                                                  
 
                                               
 
                                                                                 
                            
                                      
 
                                                                                
                            
                                           
 
                                                                                       
                            
                                                 
 
package ssh

import (
	"os"

	"gopkg.in/src-d/go-git.v4/plumbing/transport"
	"gopkg.in/src-d/go-git.v4/plumbing/transport/test"

	. "gopkg.in/check.v1"
)

type FetchPackSuite struct {
	test.FetchPackSuite
}

var _ = Suite(&FetchPackSuite{})

func (s *FetchPackSuite) SetUpSuite(c *C) {
	if os.Getenv("SSH_AUTH_SOCK") == "" {
		c.Skip("SSH_AUTH_SOCK is not set")
	}

	s.FetchPackSuite.Client = DefaultClient

	ep, err := transport.NewEndpoint("git@github.com:git-fixtures/basic.git")
	c.Assert(err, IsNil)
	s.FetchPackSuite.Endpoint = ep

	ep, err = transport.NewEndpoint("git@github.com:git-fixtures/empty.git")
	c.Assert(err, IsNil)
	s.FetchPackSuite.EmptyEndpoint = ep

	ep, err = transport.NewEndpoint("git@github.com:git-fixtures/non-existent.git")
	c.Assert(err, IsNil)
	s.FetchPackSuite.NonExistentEndpoint = ep
}