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
07e3b7cd
Unverified
Commit
07e3b7cd
authored
May 10, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74639 from xychu/fix-shellchecks-a
Make test/cmd/a*.sh pass shellcheck
parents
aa84b99f
7a385bf2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
.shellcheck_failures
hack/.shellcheck_failures
+0
-3
apply.sh
test/cmd/apply.sh
+0
-0
apps.sh
test/cmd/apps.sh
+0
-0
authorization.sh
test/cmd/authorization.sh
+6
-6
No files found.
hack/.shellcheck_failures
View file @
07e3b7cd
...
@@ -30,9 +30,6 @@
...
@@ -30,9 +30,6 @@
./hack/test-integration.sh
./hack/test-integration.sh
./hack/update-vendor.sh
./hack/update-vendor.sh
./hack/verify-test-featuregates.sh
./hack/verify-test-featuregates.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
./test/cmd/authorization.sh
./test/cmd/batch.sh
./test/cmd/batch.sh
./test/cmd/certificate.sh
./test/cmd/certificate.sh
./test/cmd/core.sh
./test/cmd/core.sh
...
...
test/cmd/apply.sh
View file @
07e3b7cd
This diff is collapsed.
Click to expand it.
test/cmd/apps.sh
View file @
07e3b7cd
This diff is collapsed.
Click to expand it.
test/cmd/authorization.sh
View file @
07e3b7cd
...
@@ -59,21 +59,21 @@ run_impersonation_tests() {
...
@@ -59,21 +59,21 @@ run_impersonation_tests() {
kube::log::status
"Testing impersonation"
kube::log::status
"Testing impersonation"
output_message
=
$(
!
kubectl get pods
"
${
kube_flags_with_token
[@]
}
"
--as-group
=
foo 2>&1
)
output_message
=
$(
!
kubectl get pods
"
${
kube_flags_with_token
[@]
:?
}
"
--as-group
=
foo 2>&1
)
kube::test::if_has_string
"
${
output_message
}
"
'without impersonating a user'
kube::test::if_has_string
"
${
output_message
}
"
'without impersonating a user'
if
kube::test::if_supports_resource
"
${
csr
}
"
;
then
if
kube::test::if_supports_resource
"
${
csr
:?
}
"
;
then
# --as
# --as
kubectl create
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
}
"
--as
=
user1
kubectl create
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
:?
}
"
--as
=
user1
kube::test::get_object_assert
'csr/foo'
'{{.spec.username}}'
'user1'
kube::test::get_object_assert
'csr/foo'
'{{.spec.username}}'
'user1'
kube::test::get_object_assert
'csr/foo'
'{{range .spec.groups}}{{.}}{{end}}'
'system:authenticated'
kube::test::get_object_assert
'csr/foo'
'{{range .spec.groups}}{{.}}{{end}}'
'system:authenticated'
kubectl delete
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
}
"
kubectl delete
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
:?
}
"
# --as-group
# --as-group
kubectl create
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
}
"
--as
=
user1
--as-group
=
group2
--as-group
=
group1
--as-group
=
,,,chameleon
kubectl create
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
:?
}
"
--as
=
user1
--as-group
=
group2
--as-group
=
group1
--as-group
=
,,,chameleon
kube::test::get_object_assert
'csr/foo'
'{{len .spec.groups}}'
'3'
kube::test::get_object_assert
'csr/foo'
'{{len .spec.groups}}'
'3'
kube::test::get_object_assert
'csr/foo'
'{{range .spec.groups}}{{.}} {{end}}'
'group2 group1 ,,,chameleon '
kube::test::get_object_assert
'csr/foo'
'{{range .spec.groups}}{{.}} {{end}}'
'group2 group1 ,,,chameleon '
kubectl delete
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
}
"
kubectl delete
-f
hack/testdata/csr.yml
"
${
kube_flags_with_token
[@]
:?
}
"
fi
fi
set
+o nounset
set
+o nounset
...
...
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