Refactor storage return for pod etcd storage
Convert the return value of pods rest.NewStorage to a struct. This will allow returning more storage objects for a pod (sub resources) without awkwardly adding more return values.
This commit is contained in:
@@ -44,9 +44,9 @@ func NewTestEtcdRegistry(client tools.EtcdClient) *Registry {
|
||||
|
||||
func NewTestEtcdRegistryWithPods(client tools.EtcdClient) *Registry {
|
||||
helper := tools.NewEtcdHelper(client, latest.Codec)
|
||||
podStorage, _, _ := podetcd.NewStorage(helper)
|
||||
podStorage := podetcd.NewStorage(helper)
|
||||
endpointStorage := endpointetcd.NewStorage(helper)
|
||||
registry := NewRegistry(helper, pod.NewRegistry(podStorage), endpoint.NewRegistry(endpointStorage))
|
||||
registry := NewRegistry(helper, pod.NewRegistry(podStorage.Pod), endpoint.NewRegistry(endpointStorage))
|
||||
return registry
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user