Add method for mocking Entrypoint in a specified namespace
This commit is contained in:
parent
2a57fb841e
commit
7539f71aed
@ -36,7 +36,7 @@ func (d dummyResolver) GetName() (name string) {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
testClient = mocks.NewClient()
|
testClient = mocks.NewClient()
|
||||||
testEntrypoint = mocks.NewEntrypoint(testClient, testNamespace)
|
testEntrypoint = mocks.NewEntrypointInNamespace(testNamespace)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,13 @@ func (m MockEntrypoint) GetNamespace() (namespace string) {
|
|||||||
return m.namespace
|
return m.namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEntrypoint(client cli.ClientInterface, namespace string) MockEntrypoint {
|
func NewEntrypointInNamespace(namespace string) MockEntrypoint {
|
||||||
return MockEntrypoint{
|
return MockEntrypoint{
|
||||||
client: client,
|
client: client,
|
||||||
namespace: namespace,
|
namespace: namespace,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewEntrypoint() MockEntrypoint {
|
||||||
|
return NewEntrypointInNamespace("test")
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user