aboutsummaryrefslogblamecommitdiffstats
path: root/plumbing/transport/ssh/fetch_pack_test.go
blob: 927e9a818de1004fb19ff06e467b10e0f7883ecb (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

}