kubernetes-entrypoint/mocks/entrypoint.go
Ian Howell 7c3ec25005 Add CRD resolution
Change-Id: Id4847961a470dcab29b618c497ddfa4b957a585f
2019-10-14 16:47:42 -05:00

32 lines
572 B
Go

package mocks
import (
"opendev.org/airship/kubernetes-entrypoint/client"
)
type MockEntrypoint struct {
MockClient *Client
namespace string
}
func (m MockEntrypoint) Resolve() {}
func (m MockEntrypoint) Client() client.ClientInterface {
return m.MockClient
}
func (m MockEntrypoint) GetNamespace() string {
return m.namespace
}
func NewEntrypointInNamespace(namespace string) *MockEntrypoint {
return &MockEntrypoint{
MockClient: NewClient(),
namespace: namespace,
}
}
func NewEntrypoint() *MockEntrypoint {
return NewEntrypointInNamespace("test")
}