mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-28 22:19:34 +00:00
Add tests for supervisor request handlers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
e6327652f0
commit
f345697c0a
1498
pkg/server/handlers/handlers_test.go
Normal file
1498
pkg/server/handlers/handlers_test.go
Normal file
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
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user