Documentation
¶
Index ¶
- type Starter
- func (s *Starter) Clean()
- func (s *Starter) DFDaemon(running time.Duration, port int) (*exec.Cmd, error)
- func (s *Starter) DFGet(running time.Duration, args ...string) (*exec.Cmd, error)
- func (s *Starter) DFGetServer(running time.Duration, args ...string) (*exec.Cmd, error)
- func (s *Starter) Kill(cmd *exec.Cmd)
- func (s *Starter) KillAll()
- func (s *Starter) Supernode(running time.Duration, args ...string) (cmd *exec.Cmd, err error)
- func (s *Starter) WriteSupernodeFileServer(filePath string, data []byte, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Starter ¶
type Starter struct { // Name identify the Starter instance. Name string // Home is the temporary working home. Home string // contains filtered or unexported fields }
Starter is a set of all components' starter. It provides an easy way to manager processes and recycle resources for integration testing. For example:
type ExampleSuite struct { starter *Starter } func (s *ExampleSuite) SetUpSuite(c *check.C) { s.starter = NewStarter("ExampleSuite") } func (s *ExampleSuite) TearDownSuite(c *check.C) { s.starter.Clean() }
func NewStarter ¶
NewStarter creates an instance of Starter. It checks the binary files whether is existing and creates a temporary directory for testing.
func (*Starter) Clean ¶
func (s *Starter) Clean()
Clean cleans all temporary directories and processes.
func (*Starter) DFGetServer ¶
DFGetServer starts dfget as a peer server.
Click to show internal directories.
Click to hide internal directories.