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
3d333013
Unverified
Commit
3d333013
authored
Aug 14, 2018
by
Nikhita Raghunath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubectl: update message for a no-op patch
parent
3b4eb0a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
patch.go
pkg/kubectl/cmd/patch.go
+1
-1
core.sh
test/cmd/core.sh
+2
-2
No files found.
pkg/kubectl/cmd/patch.go
View file @
3d333013
...
...
@@ -331,5 +331,5 @@ func patchOperation(didPatch bool) string {
if
didPatch
{
return
"patched"
}
return
"
not patched
"
return
"
patched (no change)
"
}
test/cmd/core.sh
View file @
3d333013
...
...
@@ -439,9 +439,9 @@ run_pod_tests() {
output_message
=
$(
!
kubectl patch
"
${
kube_flags
[@]
}
"
pod valid-pod
-p
=
'{"metadata":{"labels":"invalid"}}'
2>&1
)
kube::test::if_has_string
"
${
output_message
}
"
'cannot restore map from string'
## Patch exits with error message "
not patched
" and exit code 0 when no-op occurs
## Patch exits with error message "
patched (no change)
" and exit code 0 when no-op occurs
output_message
=
$(
kubectl patch
"
${
kube_flags
[@]
}
"
pod valid-pod
-p
=
'{"metadata":{"labels":{"name":"valid-pod"}}}'
2>&1
)
kube::test::if_has_string
"
${
output_message
}
"
'
not patched
'
kube::test::if_has_string
"
${
output_message
}
"
'
patched (no change)
'
## Patch pod can change image
# Command
...
...
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