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
32b6225c
Commit
32b6225c
authored
Jan 21, 2019
by
andrewsykim
Committed by
Andrew Kim
Jan 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor PVL unit tests to use test tables & add test cases for remaining cloud providers
parent
22fce22a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
BUILD
plugin/pkg/admission/storage/persistentvolume/label/BUILD
+2
-1
admission.go
...pkg/admission/storage/persistentvolume/label/admission.go
+2
-1
admission_test.go
...dmission/storage/persistentvolume/label/admission_test.go
+0
-0
No files found.
plugin/pkg/admission/storage/persistentvolume/label/BUILD
View file @
32b6225c
...
@@ -34,9 +34,10 @@ go_test(
...
@@ -34,9 +34,10 @@ go_test(
deps = [
deps = [
"//pkg/apis/core:go_default_library",
"//pkg/apis/core:go_default_library",
"//pkg/kubelet/apis:go_default_library",
"//pkg/kubelet/apis:go_default_library",
"//pkg/volume/util:go_default_library",
"//staging/src/k8s.io/api/core/v1:go_default_library",
"//staging/src/k8s.io/api/core/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/admission:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/admission:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library",
],
],
...
...
plugin/pkg/admission/storage/persistentvolume/label/admission.go
View file @
32b6225c
...
@@ -158,7 +158,8 @@ func (l *persistentVolumeLabel) Admit(a admission.Attributes) (err error) {
...
@@ -158,7 +158,8 @@ func (l *persistentVolumeLabel) Admit(a admission.Attributes) (err error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
admission
.
NewForbidden
(
a
,
fmt
.
Errorf
(
"failed to convert label string for Zone: %s to a Set"
,
v
))
return
admission
.
NewForbidden
(
a
,
fmt
.
Errorf
(
"failed to convert label string for Zone: %s to a Set"
,
v
))
}
}
values
=
zones
.
UnsortedList
()
// zone values here are sorted for better testability.
values
=
zones
.
List
()
}
else
{
}
else
{
values
=
[]
string
{
v
}
values
=
[]
string
{
v
}
}
}
...
...
plugin/pkg/admission/storage/persistentvolume/label/admission_test.go
View file @
32b6225c
This diff is collapsed.
Click to expand it.
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