Documentation
¶
Index ¶
- func AssertEventually(t *testing.T, condition func() bool, timeout time.Duration)
- func CreateTestPeerInfo(id string, addresses ...string) *model.PeerInfo
- func NewTestServer(t *testing.T, handler func(net.Conn)) (string, func())
- func SendTestMessage(w io.Writer, messageType string, payload interface{}) error
- func SetupTestRepo(t *testing.T) (*git.Repository, func())
- func WaitForCondition(t *testing.T, condition func() bool, timeout time.Duration, message string) bool
- func WriteFile(fs billy.Filesystem, path string, content string) error
- type MockConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEventually ¶
AssertEventually repeatedly checks a condition with timeout
func CreateTestPeerInfo ¶
CreateTestPeerInfo creates a PeerInfo instance for testing
func NewTestServer ¶
NewTestServer creates a TCP server for testing with custom message handling
func SendTestMessage ¶
SendTestMessage sends a message to a writer for testing
func SetupTestRepo ¶
func SetupTestRepo(t *testing.T) (*git.Repository, func())
SetupTestRepo creates a temporary git repository for testing
Types ¶
type MockConfig ¶
MockConfig implements the Config interface
func NewMockConfig ¶
func NewMockConfig() *MockConfig
NewMockConfig creates a new MockConfig with default values
Click to show internal directories.
Click to hide internal directories.