Files
play-with-docker/k8s/factory_mock.go
2017-11-21 15:21:15 -03:00

22 lines
540 B
Go

package k8s
import (
"github.com/play-with-docker/play-with-docker/pwd/types"
"github.com/stretchr/testify/mock"
"k8s.io/client-go/kubernetes"
)
type FactoryMock struct {
mock.Mock
}
func (m *FactoryMock) GetKubeletForInstance(i *types.Instance) (*KubeletClient, error) {
args := m.Called(i)
return args.Get(0).(*KubeletClient), args.Error(1)
}
func (m *FactoryMock) GetForInstance(instance *types.Instance) (*kubernetes.Clientset, error) {
args := m.Called(instance)
return args.Get(0).(*kubernetes.Clientset), args.Error(1)
}