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
66590d6f
Unverified
Commit
66590d6f
authored
Nov 03, 2017
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Container manager has a bad fake interface
parent
d3790db0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
container_manager_unsupported_test.go
pkg/kubelet/cm/container_manager_unsupported_test.go
+20
-5
No files found.
pkg/kubelet/cm/container_manager_unsupported_test.go
View file @
66590d6f
...
@@ -40,17 +40,20 @@ func (mi *fakeMountInterface) List() ([]mount.MountPoint, error) {
...
@@ -40,17 +40,20 @@ func (mi *fakeMountInterface) List() ([]mount.MountPoint, error) {
return
mi
.
mountPoints
,
nil
return
mi
.
mountPoints
,
nil
}
}
func
(
f
*
fakeMountInterface
)
IsMountPointMatch
(
mp
mount
.
MountPoint
,
dir
string
)
bool
{
func
(
mi
*
fakeMountInterface
)
IsMountPointMatch
(
mp
mount
.
MountPoint
,
dir
string
)
bool
{
return
(
mp
.
Path
==
dir
)
return
(
mp
.
Path
==
dir
)
}
}
func
(
f
*
fakeMountInterface
)
IsNotMountPoint
(
dir
string
)
(
bool
,
error
)
{
func
(
mi
*
fakeMountInterface
)
IsNotMountPoint
(
dir
string
)
(
bool
,
error
)
{
return
false
,
fmt
.
Errorf
(
"unsupported"
)
return
false
,
fmt
.
Errorf
(
"unsupported"
)
}
}
func
(
mi
*
fakeMountInterface
)
IsLikelyNotMountPoint
(
file
string
)
(
bool
,
error
)
{
func
(
mi
*
fakeMountInterface
)
IsLikelyNotMountPoint
(
file
string
)
(
bool
,
error
)
{
return
false
,
fmt
.
Errorf
(
"unsupported"
)
return
false
,
fmt
.
Errorf
(
"unsupported"
)
}
}
func
(
mi
*
fakeMountInterface
)
GetDeviceNameFromMount
(
mountPath
,
pluginDir
string
)
(
string
,
error
)
{
return
""
,
nil
}
func
(
mi
*
fakeMountInterface
)
DeviceOpened
(
pathname
string
)
(
bool
,
error
)
{
func
(
mi
*
fakeMountInterface
)
DeviceOpened
(
pathname
string
)
(
bool
,
error
)
{
for
_
,
mp
:=
range
mi
.
mountPoints
{
for
_
,
mp
:=
range
mi
.
mountPoints
{
...
@@ -65,14 +68,26 @@ func (mi *fakeMountInterface) PathIsDevice(pathname string) (bool, error) {
...
@@ -65,14 +68,26 @@ func (mi *fakeMountInterface) PathIsDevice(pathname string) (bool, error) {
return
true
,
nil
return
true
,
nil
}
}
func
(
mi
*
fakeMountInterface
)
GetDeviceNameFromMount
(
mountPath
,
pluginDir
string
)
(
string
,
error
)
{
func
(
mi
*
fakeMountInterface
)
MakeRShared
(
path
string
)
error
{
return
""
,
nil
return
nil
}
}
func
(
mi
*
fakeMountInterface
)
MakeRShared
(
path
string
)
error
{
func
(
mi
*
fakeMountInterface
)
GetFileType
(
pathname
string
)
(
mount
.
FileType
,
error
)
{
return
mount
.
FileType
(
"fake"
),
nil
}
func
(
mi
*
fakeMountInterface
)
MakeDir
(
pathname
string
)
error
{
return
nil
return
nil
}
}
func
(
mi
*
fakeMountInterface
)
MakeFile
(
pathname
string
)
error
{
return
nil
}
func
(
mi
*
fakeMountInterface
)
ExistsPath
(
pathname
string
)
bool
{
return
true
}
func
fakeContainerMgrMountInt
()
mount
.
Interface
{
func
fakeContainerMgrMountInt
()
mount
.
Interface
{
return
&
fakeMountInterface
{
return
&
fakeMountInterface
{
[]
mount
.
MountPoint
{
[]
mount
.
MountPoint
{
...
...
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