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
bba6e258
Unverified
Commit
bba6e258
authored
Oct 16, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69739 from mortent/UnflakeCmdRsTest
Remove flaky test by avoiding reuse of name for replicaset
parents
31438712
dcb3d8b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
apps.sh
test/cmd/apps.sh
+4
-2
No files found.
test/cmd/apps.sh
View file @
bba6e258
...
@@ -510,11 +510,13 @@ run_rs_tests() {
...
@@ -510,11 +510,13 @@ run_rs_tests() {
# Pre-condition: no replica set exists
# Pre-condition: no replica set exists
kube::test::get_object_assert rs
"{{range.items}}{{
$id_field
}}:{{end}}"
''
kube::test::get_object_assert rs
"{{range.items}}{{
$id_field
}}:{{end}}"
''
# Command
# Command
kubectl create
-f
hack/testdata/frontend-replicaset.yaml
"
${
kube_flags
[@]
}
"
#TODO(mortent): Remove this workaround when ReplicaSet bug described in issue #69376 is fixed
local
replicaset_name
=
"frontend-no-cascade"
sed
-r
's/^(\s*)(name\s*:\s*frontend\s*$)/\1name: '
"
${
replicaset_name
}
"
'/'
hack/testdata/frontend-replicaset.yaml | kubectl create
"
${
kube_flags
[@]
}
"
-f
-
# wait for all 3 pods to be set up
# wait for all 3 pods to be set up
kube::test::wait_object_assert
'pods -l "tier=frontend"'
"{{range.items}}{{
$pod_container_name_field
}}:{{end}}"
'php-redis:php-redis:php-redis:'
kube::test::wait_object_assert
'pods -l "tier=frontend"'
"{{range.items}}{{
$pod_container_name_field
}}:{{end}}"
'php-redis:php-redis:php-redis:'
kube::log::status
"Deleting rs"
kube::log::status
"Deleting rs"
kubectl delete rs
frontend
"
${
kube_flags
[@]
}
"
--cascade
=
false
kubectl delete rs
"
${
replicaset_name
}
"
"
${
kube_flags
[@]
}
"
--cascade
=
false
# Wait for the rs to be deleted.
# Wait for the rs to be deleted.
kube::test::wait_object_assert rs
"{{range.items}}{{
$id_field
}}:{{end}}"
''
kube::test::wait_object_assert rs
"{{range.items}}{{
$id_field
}}:{{end}}"
''
# Post-condition: All 3 pods still remain from frontend replica set
# Post-condition: All 3 pods still remain from frontend replica set
...
...
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