mirror of https://github.com/k3s-io/k3s
Add tests for supervisor request handlers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/11537/head
parent
e6327652f0
commit
f345697c0a
File diff suppressed because it is too large
Load Diff
|
@ -224,6 +224,16 @@ func (m *NodeStore) Create(node *v1.Node) (*v1.Node, error) {
|
||||||
return node, nil
|
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) {
|
func (m *NodeStore) List(ls labels.Selector) ([]v1.Node, error) {
|
||||||
nodes := []v1.Node{}
|
nodes := []v1.Node{}
|
||||||
if ls == nil {
|
if ls == nil {
|
||||||
|
|
Loading…
Reference in New Issue