Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f345697c
Commit
f345697c
authored
Dec 16, 2024
by
Brad Davidson
Committed by
Brad Davidson
Jan 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for supervisor request handlers
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
e6327652
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
handlers_test.go
pkg/server/handlers/handlers_test.go
+0
-0
core.go
tests/mock/core.go
+10
-0
No files found.
pkg/server/handlers/handlers_test.go
0 → 100644
View file @
f345697c
This diff is collapsed.
Click to expand it.
tests/mock/core.go
View file @
f345697c
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment