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
baa4b770
Commit
baa4b770
authored
Oct 21, 2017
by
Brad Topol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add service latency and secret related conformance annotations
Signed-off-by:
Brad Topol
<
btopol@us.ibm.com
>
parent
668bedd9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
secrets.go
test/e2e/common/secrets.go
+10
-0
secrets_volume.go
test/e2e/common/secrets_volume.go
+34
-0
service_latency.go
test/e2e/network/service_latency.go
+6
-0
No files found.
test/e2e/common/secrets.go
View file @
baa4b770
...
@@ -30,6 +30,11 @@ import (
...
@@ -30,6 +30,11 @@ import (
var
_
=
Describe
(
"[sig-api-machinery] Secrets"
,
func
()
{
var
_
=
Describe
(
"[sig-api-machinery] Secrets"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"secrets"
)
f
:=
framework
.
NewDefaultFramework
(
"secrets"
)
/*
Testname: secret-env-vars
Description: Ensure that secret can be consumed via environment
variables.
*/
It
(
"should be consumable from pods in env vars [Conformance]"
,
func
()
{
It
(
"should be consumable from pods in env vars [Conformance]"
,
func
()
{
name
:=
"secret-test-"
+
string
(
uuid
.
NewUUID
())
name
:=
"secret-test-"
+
string
(
uuid
.
NewUUID
())
secret
:=
secretForTest
(
f
.
Namespace
.
Name
,
name
)
secret
:=
secretForTest
(
f
.
Namespace
.
Name
,
name
)
...
@@ -74,6 +79,11 @@ var _ = Describe("[sig-api-machinery] Secrets", func() {
...
@@ -74,6 +79,11 @@ var _ = Describe("[sig-api-machinery] Secrets", func() {
})
})
})
})
/*
Testname: secret-configmaps-source
Description: Ensure that secret can be consumed via source of a set
of ConfigMaps.
*/
It
(
"should be consumable via the environment [Conformance]"
,
func
()
{
It
(
"should be consumable via the environment [Conformance]"
,
func
()
{
name
:=
"secret-test-"
+
string
(
uuid
.
NewUUID
())
name
:=
"secret-test-"
+
string
(
uuid
.
NewUUID
())
secret
:=
newEnvFromSecret
(
f
.
Namespace
.
Name
,
name
)
secret
:=
newEnvFromSecret
(
f
.
Namespace
.
Name
,
name
)
...
...
test/e2e/common/secrets_volume.go
View file @
baa4b770
...
@@ -33,15 +33,30 @@ import (
...
@@ -33,15 +33,30 @@ import (
var
_
=
Describe
(
"[sig-storage] Secrets"
,
func
()
{
var
_
=
Describe
(
"[sig-storage] Secrets"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"secrets"
)
f
:=
framework
.
NewDefaultFramework
(
"secrets"
)
/*
Testname: secret-volume-mount-without-mapping
Description: Ensure that secret can be mounted without mapping to a
pod volume.
*/
It
(
"should be consumable from pods in volume [Conformance]"
,
func
()
{
It
(
"should be consumable from pods in volume [Conformance]"
,
func
()
{
doSecretE2EWithoutMapping
(
f
,
nil
/* default mode */
,
"secret-test-"
+
string
(
uuid
.
NewUUID
()),
nil
,
nil
)
doSecretE2EWithoutMapping
(
f
,
nil
/* default mode */
,
"secret-test-"
+
string
(
uuid
.
NewUUID
()),
nil
,
nil
)
})
})
/*
Testname: secret-volume-mount-without-mapping-default-mode
Description: Ensure that secret can be mounted without mapping to a
pod volume in default mode.
*/
It
(
"should be consumable from pods in volume with defaultMode set [Conformance]"
,
func
()
{
It
(
"should be consumable from pods in volume with defaultMode set [Conformance]"
,
func
()
{
defaultMode
:=
int32
(
0400
)
defaultMode
:=
int32
(
0400
)
doSecretE2EWithoutMapping
(
f
,
&
defaultMode
,
"secret-test-"
+
string
(
uuid
.
NewUUID
()),
nil
,
nil
)
doSecretE2EWithoutMapping
(
f
,
&
defaultMode
,
"secret-test-"
+
string
(
uuid
.
NewUUID
()),
nil
,
nil
)
})
})
/*
Testname: secret-volume-mount-without-mapping-non-root-default-mode-fsgroup
Description: Ensure that secret can be mounted without mapping to a pod
volume as non-root in default mode with fsGroup set.
*/
It
(
"should be consumable from pods in volume as non-root with defaultMode and fsGroup set [Conformance]"
,
func
()
{
It
(
"should be consumable from pods in volume as non-root with defaultMode and fsGroup set [Conformance]"
,
func
()
{
defaultMode
:=
int32
(
0440
)
/* setting fsGroup sets mode to at least 440 */
defaultMode
:=
int32
(
0440
)
/* setting fsGroup sets mode to at least 440 */
fsGroup
:=
int64
(
1001
)
fsGroup
:=
int64
(
1001
)
...
@@ -49,10 +64,20 @@ var _ = Describe("[sig-storage] Secrets", func() {
...
@@ -49,10 +64,20 @@ var _ = Describe("[sig-storage] Secrets", func() {
doSecretE2EWithoutMapping
(
f
,
&
defaultMode
,
"secret-test-"
+
string
(
uuid
.
NewUUID
()),
&
fsGroup
,
&
uid
)
doSecretE2EWithoutMapping
(
f
,
&
defaultMode
,
"secret-test-"
+
string
(
uuid
.
NewUUID
()),
&
fsGroup
,
&
uid
)
})
})
/*
Testname: secret-volume-mount-with-mapping
Description: Ensure that secret can be mounted with mapping to a pod
volume.
*/
It
(
"should be consumable from pods in volume with mappings [Conformance]"
,
func
()
{
It
(
"should be consumable from pods in volume with mappings [Conformance]"
,
func
()
{
doSecretE2EWithMapping
(
f
,
nil
)
doSecretE2EWithMapping
(
f
,
nil
)
})
})
/*
Testname: secret-volume-mount-with-mapping-item-mode
Description: Ensure that secret can be mounted with mapping to a pod
volume in item mode.
*/
It
(
"should be consumable from pods in volume with mappings and Item Mode set [Conformance]"
,
func
()
{
It
(
"should be consumable from pods in volume with mappings and Item Mode set [Conformance]"
,
func
()
{
mode
:=
int32
(
0400
)
mode
:=
int32
(
0400
)
doSecretE2EWithMapping
(
f
,
&
mode
)
doSecretE2EWithMapping
(
f
,
&
mode
)
...
@@ -79,6 +104,10 @@ var _ = Describe("[sig-storage] Secrets", func() {
...
@@ -79,6 +104,10 @@ var _ = Describe("[sig-storage] Secrets", func() {
doSecretE2EWithoutMapping
(
f
,
nil
/* default mode */
,
secret2
.
Name
,
nil
,
nil
)
doSecretE2EWithoutMapping
(
f
,
nil
/* default mode */
,
secret2
.
Name
,
nil
,
nil
)
})
})
/*
Testname: secret-multiple-volume-mounts
Description: Ensure that secret can be mounted to multiple pod volumes.
*/
It
(
"should be consumable in multiple volumes in a pod [Conformance]"
,
func
()
{
It
(
"should be consumable in multiple volumes in a pod [Conformance]"
,
func
()
{
// This test ensures that the same secret can be mounted in multiple
// This test ensures that the same secret can be mounted in multiple
// volumes in the same pod. This test case exists to prevent
// volumes in the same pod. This test case exists to prevent
...
@@ -152,6 +181,11 @@ var _ = Describe("[sig-storage] Secrets", func() {
...
@@ -152,6 +181,11 @@ var _ = Describe("[sig-storage] Secrets", func() {
})
})
})
})
/*
Testname: secret-mounted-volume-optional-update-change
Description: Ensure that optional update change to secret can be
reflected on a mounted volume.
*/
It
(
"optional updates should be reflected in volume [Conformance]"
,
func
()
{
It
(
"optional updates should be reflected in volume [Conformance]"
,
func
()
{
podLogTimeout
:=
framework
.
GetPodSecretUpdateTimeout
(
f
.
ClientSet
)
podLogTimeout
:=
framework
.
GetPodSecretUpdateTimeout
(
f
.
ClientSet
)
containerTimeoutArg
:=
fmt
.
Sprintf
(
"--retry_time=%v"
,
int
(
podLogTimeout
.
Seconds
()))
containerTimeoutArg
:=
fmt
.
Sprintf
(
"--retry_time=%v"
,
int
(
podLogTimeout
.
Seconds
()))
...
...
test/e2e/network/service_latency.go
View file @
baa4b770
...
@@ -45,6 +45,12 @@ func (d durations) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
...
@@ -45,6 +45,12 @@ func (d durations) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
var
_
=
SIGDescribe
(
"Service endpoints latency"
,
func
()
{
var
_
=
SIGDescribe
(
"Service endpoints latency"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"svc-latency"
)
f
:=
framework
.
NewDefaultFramework
(
"svc-latency"
)
/*
Testname: service-endpoint-latency
Description: Ensure service endpoint's latency is not high
(e.g. p50 < 20 seconds and p99 < 50 seconds). If any call to the
service endpoint fails, the test will also fail.
*/
It
(
"should not be very high [Conformance]"
,
func
()
{
It
(
"should not be very high [Conformance]"
,
func
()
{
const
(
const
(
// These are very generous criteria. Ideally we will
// These are very generous criteria. Ideally we will
...
...
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