Initial k8s support in libplayground (#216)
* Initial k8s support in libplayground * Make tasks never give up + custom event for k8s cluster status
This commit is contained in:
21
k8s/factory_mock.go
Normal file
21
k8s/factory_mock.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user