Commit 014f1a05 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Add tests for supervisor request handlers

Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com> (cherry picked from commit f345697c) Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent a3d768a7
......@@ -224,6 +224,16 @@ func (m *NodeStore) Create(node *v1.Node) (*v1.Node, error) {
return node, nil
}
func (m *NodeStore) Get(name string) (*v1.Node, error) {
if m.nodes == nil {
return nil, ErrorNotFound("node", name)
}
if node, ok := m.nodes[name]; ok {
return &node, nil
}
return nil, ErrorNotFound("node", name)
}
func (m *NodeStore) List(ls labels.Selector) ([]v1.Node, error) {
nodes := []v1.Node{}
if ls == nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment