chore(tests): migrate to Testify for mocking and assertions

This commit is contained in:
2026-01-26 11:53:00 +07:00
parent 65df01fee5
commit ee1dc3c3cd
10 changed files with 530 additions and 547 deletions
-13
View File
@@ -144,19 +144,6 @@ func (m *MockLifecycle) Close() error {
return args.Error(0)
}
type MockSSHConn struct {
ssh.Conn
mock.Mock
}
func (m *MockSSHConn) OpenChannel(name string, data []byte) (ssh.Channel, <-chan *ssh.Request, error) {
args := m.Called(name, data)
if args.Get(0) == nil {
return nil, args.Get(1).(<-chan *ssh.Request), args.Error(2)
}
return args.Get(0).(ssh.Channel), args.Get(1).(<-chan *ssh.Request), args.Error(2)
}
type MockSSHChannel struct {
ssh.Channel
mock.Mock