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
36f7bc76
Commit
36f7bc76
authored
Jun 22, 2018
by
Michael Taufen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend FakeVolumePlugin to implement VolumePluginWithAttachLimits interface
parent
c5a5e216
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
testing.go
pkg/volume/testing/testing.go
+12
-0
No files found.
pkg/volume/testing/testing.go
View file @
36f7bc76
...
...
@@ -223,6 +223,9 @@ type FakeVolumePlugin struct {
LastProvisionerOptions
VolumeOptions
NewAttacherCallCount
int
NewDetacherCallCount
int
VolumeLimits
map
[
string
]
int64
VolumeLimitsError
error
LimitKey
string
Mounters
[]
*
FakeVolume
Unmounters
[]
*
FakeVolume
...
...
@@ -238,6 +241,7 @@ var _ RecyclableVolumePlugin = &FakeVolumePlugin{}
var
_
DeletableVolumePlugin
=
&
FakeVolumePlugin
{}
var
_
ProvisionableVolumePlugin
=
&
FakeVolumePlugin
{}
var
_
AttachableVolumePlugin
=
&
FakeVolumePlugin
{}
var
_
VolumePluginWithAttachLimits
=
&
FakeVolumePlugin
{}
func
(
plugin
*
FakeVolumePlugin
)
getFakeVolume
(
list
*
[]
*
FakeVolume
)
*
FakeVolume
{
volume
:=
&
FakeVolume
{}
...
...
@@ -448,6 +452,14 @@ func (plugin *FakeVolumePlugin) RequiresFSResize() bool {
return
true
}
func
(
plugin
*
FakeVolumePlugin
)
GetVolumeLimits
()
(
map
[
string
]
int64
,
error
)
{
return
plugin
.
VolumeLimits
,
plugin
.
VolumeLimitsError
}
func
(
plugin
*
FakeVolumePlugin
)
VolumeLimitKey
(
spec
*
Spec
)
string
{
return
plugin
.
LimitKey
}
type
FakeFileVolumePlugin
struct
{
}
...
...
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