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() {
|
||||
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
|
||||
}
|
||||
|
||||
func NewEntrypoint(client cli.ClientInterface, namespace string) MockEntrypoint {
|
||||
func NewEntrypointInNamespace(namespace string) MockEntrypoint {
|
||||
return MockEntrypoint{
|
||||
client: client,
|
||||
namespace: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
func NewEntrypoint() MockEntrypoint {
|
||||
return NewEntrypointInNamespace("test")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user