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
222f6ae3
Commit
222f6ae3
authored
Jun 21, 2017
by
mbohlool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test from #47578
parent
9fe19d10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
test-cmd-util.sh
hack/make-rules/test-cmd-util.sh
+10
-0
deployment-with-UnixUserID.yaml
hack/testdata/deployment-with-UnixUserID.yaml
+18
-0
No files found.
hack/make-rules/test-cmd-util.sh
View file @
222f6ae3
...
...
@@ -2851,6 +2851,16 @@ run_deployment_tests() {
# Clean up
kubectl delete deployment test-nginx-apps
"
${
kube_flags
[@]
}
"
### Test kubectl create deployment should not fail validation
# Pre-Condition: No deployment exists.
kube::test::get_object_assert deployment
"{{range.items}}{{
$id_field
}}:{{end}}"
''
# Command
kubectl create
-f
hack/testdata/deployment-with-UnixUserID.yaml
"
${
kube_flags
[@]
}
"
# Post-Condition: Deployment "deployment-with-unixuserid" is created.
kube::test::get_object_assert deployment
"{{range.items}}{{
$id_field
}}:{{end}}"
'deployment-with-unixuserid:'
# Clean up
kubectl delete deployment deployment-with-unixuserid
"
${
kube_flags
[@]
}
"
### Test cascading deletion
## Test that rs is deleted when deployment is deleted.
# Pre-condition: no deployment exists
...
...
hack/testdata/deployment-with-UnixUserID.yaml
0 → 100644
View file @
222f6ae3
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
deployment-with-unixuserid
spec
:
replicas
:
1
template
:
metadata
:
labels
:
app
:
nginx
spec
:
containers
:
-
name
:
nginx
image
:
nginx:1.7.9
securityContext
:
runAsNonRoot
:
true
runAsUser
:
65534
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