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
2260cc29
Commit
2260cc29
authored
Feb 27, 2019
by
Xiangyang Chu
Committed by
Xiangyang Chu
Apr 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test/cmd/a*.sh pass shellcheck
parent
7289c1e9
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 @
2260cc29
...
...
@@ -33,9 +33,6 @@
./hack/update-vendor.sh
./hack/verify-golint.sh
./hack/verify-test-featuregates.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
./test/cmd/authorization.sh
./test/cmd/batch.sh
./test/cmd/certificate.sh
./test/cmd/core.sh
...
...
test/cmd/apply.sh
View file @
2260cc29
This diff is collapsed.
Click to expand it.
test/cmd/apps.sh
View file @
2260cc29
This diff is collapsed.
Click to expand it.
test/cmd/authorization.sh
View file @
2260cc29
...
...
@@ -59,21 +59,21 @@ run_impersonation_tests() {
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'
if
kube::test::if_supports_resource
"
${
csr
}
"
;
then
if
kube::test::if_supports_resource
"
${
csr
:?
}
"
;
then
# --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'
'{{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
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'
'{{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
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