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
6f2b88cb
Commit
6f2b88cb
authored
Feb 20, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21516 from nikhiljindal/limitRangee2e
Auto commit by PR queue bot
parents
06a6aaca
68dec277
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
limit_range.go
test/e2e/limit_range.go
+8
-0
No files found.
test/e2e/limit_range.go
View file @
6f2b88cb
...
@@ -61,8 +61,12 @@ var _ = Describe("LimitRange", func() {
...
@@ -61,8 +61,12 @@ var _ = Describe("LimitRange", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
for
i
:=
range
pod
.
Spec
.
Containers
{
for
i
:=
range
pod
.
Spec
.
Containers
{
err
=
equalResourceRequirement
(
expected
,
pod
.
Spec
.
Containers
[
i
]
.
Resources
)
err
=
equalResourceRequirement
(
expected
,
pod
.
Spec
.
Containers
[
i
]
.
Resources
)
if
err
!=
nil
{
// Print the pod to help in debugging.
Logf
(
"Pod %+v does not have the expected requirements"
,
pod
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
}
}
}
By
(
"Creating a Pod with partial resource requirements"
)
By
(
"Creating a Pod with partial resource requirements"
)
pod
=
newTestPod
(
"pod-partial-resources"
,
getResourceList
(
""
,
"150Mi"
),
getResourceList
(
"300m"
,
""
))
pod
=
newTestPod
(
"pod-partial-resources"
,
getResourceList
(
""
,
"150Mi"
),
getResourceList
(
"300m"
,
""
))
...
@@ -78,8 +82,12 @@ var _ = Describe("LimitRange", func() {
...
@@ -78,8 +82,12 @@ var _ = Describe("LimitRange", func() {
expected
=
api
.
ResourceRequirements
{
Requests
:
getResourceList
(
"300m"
,
"150Mi"
),
Limits
:
getResourceList
(
"300m"
,
"500Mi"
)}
expected
=
api
.
ResourceRequirements
{
Requests
:
getResourceList
(
"300m"
,
"150Mi"
),
Limits
:
getResourceList
(
"300m"
,
"500Mi"
)}
for
i
:=
range
pod
.
Spec
.
Containers
{
for
i
:=
range
pod
.
Spec
.
Containers
{
err
=
equalResourceRequirement
(
expected
,
pod
.
Spec
.
Containers
[
i
]
.
Resources
)
err
=
equalResourceRequirement
(
expected
,
pod
.
Spec
.
Containers
[
i
]
.
Resources
)
if
err
!=
nil
{
// Print the pod to help in debugging.
Logf
(
"Pod %+v does not have the expected requirements"
,
pod
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
}
}
}
By
(
"Failing to create a Pod with less than min resources"
)
By
(
"Failing to create a Pod with less than min resources"
)
pod
=
newTestPod
(
podName
,
getResourceList
(
"10m"
,
"50Mi"
),
api
.
ResourceList
{})
pod
=
newTestPod
(
podName
,
getResourceList
(
"10m"
,
"50Mi"
),
api
.
ResourceList
{})
...
...
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