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
001899e3
Commit
001899e3
authored
Oct 09, 2015
by
Janet Kuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable validate when test kubectl with List
parent
8e25b7c7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
4 deletions
+18
-4
test-cmd.sh
hack/test-cmd.sh
+2
-4
multi-resource-rclist-modify.json
hack/testdata/multi-resource-rclist-modify.json
+4
-0
multi-resource-rclist.json
hack/testdata/multi-resource-rclist.json
+4
-0
multi-resource-svclist-modify.json
hack/testdata/multi-resource-svclist-modify.json
+4
-0
multi-resource-svclist.json
hack/testdata/multi-resource-svclist.json
+4
-0
No files found.
hack/test-cmd.sh
View file @
001899e3
...
...
@@ -784,8 +784,7 @@ __EOF__
kube::test::get_object_assert services
"{{range.items}}{{
$id_field
}}:{{end}}"
'kubernetes:'
kube::test::get_object_assert rc
"{{range.items}}{{
$id_field
}}:{{end}}"
''
# Command
# TODO: remove --validate=false when PR "Add validate support for list kind #14726" is merged
kubectl create
-f
"
${
file
}
"
--validate
=
false
"
${
kube_flags
[@]
}
"
kubectl create
-f
"
${
file
}
"
"
${
kube_flags
[@]
}
"
# Post-condition: mock service (and mock2) is running
if
[
"
$has_svc
"
=
true
]
;
then
if
[
"
$two_svcs
"
=
true
]
;
then
...
...
@@ -807,8 +806,7 @@ __EOF__
kubectl get
-f
"
${
file
}
"
"
${
kube_flags
[@]
}
"
kubectl describe
-f
"
${
file
}
"
"
${
kube_flags
[@]
}
"
# Command
# TODO: remove --validate=false when PR "Add validate support for list kind #14726" is merged
kubectl replace
-f
$replace_file
--force
--validate
=
false
"
${
kube_flags
[@]
}
"
kubectl replace
-f
$replace_file
--force
"
${
kube_flags
[@]
}
"
# Post-condition: mock service (and mock2) and mock rc (and mock2) are replaced
if
[
"
$has_svc
"
=
true
]
;
then
kube::test::get_object_assert
'services mock'
"{{
${
labels_field
}
.status}}"
'replaced'
...
...
hack/testdata/multi-resource-rclist-modify.json
View file @
001899e3
...
...
@@ -3,6 +3,8 @@
"apiVersion"
:
"v1"
,
"items"
:[
{
"kind"
:
"ReplicationController"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock"
,
"labels"
:{
...
...
@@ -35,6 +37,8 @@
}
},
{
"kind"
:
"ReplicationController"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock2"
,
"labels"
:{
...
...
hack/testdata/multi-resource-rclist.json
View file @
001899e3
...
...
@@ -3,6 +3,8 @@
"apiVersion"
:
"v1"
,
"items"
:[
{
"kind"
:
"ReplicationController"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock"
,
"labels"
:{
...
...
@@ -35,6 +37,8 @@
}
},
{
"kind"
:
"ReplicationController"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock2"
,
"labels"
:{
...
...
hack/testdata/multi-resource-svclist-modify.json
View file @
001899e3
...
...
@@ -3,6 +3,8 @@
"apiVersion"
:
"v1"
,
"items"
:[
{
"kind"
:
"Service"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock"
,
"labels"
:{
...
...
@@ -22,6 +24,8 @@
}
},
{
"kind"
:
"Service"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock2"
,
"labels"
:{
...
...
hack/testdata/multi-resource-svclist.json
View file @
001899e3
...
...
@@ -3,6 +3,8 @@
"apiVersion"
:
"v1"
,
"items"
:[
{
"kind"
:
"Service"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock"
,
"labels"
:{
...
...
@@ -21,6 +23,8 @@
}
},
{
"kind"
:
"Service"
,
"apiVersion"
:
"v1"
,
"metadata"
:{
"name"
:
"mock2"
,
"labels"
:{
...
...
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