Add controller API client interface (#1467)
This PR adds an interface for controller API client, it allows us to implement mock API client for unit testing with ease and we are able to generate spec file without accessing the real Fission server.
This commit is contained in:
@@ -25,10 +25,10 @@ import (
|
||||
)
|
||||
|
||||
type FissionVersion struct {
|
||||
client *client.Client
|
||||
client client.Interface
|
||||
}
|
||||
|
||||
func NewFissionVersion(client *client.Client) Resource {
|
||||
func NewFissionVersion(client client.Interface) Resource {
|
||||
return FissionVersion{client: client}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user