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
7645513d
Commit
7645513d
authored
Jul 24, 2015
by
Jerzy Szczepkowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10749 from mwielgus/secret_and_downward
E2E tests for examples/downward-api and examples/secrets
parents
1081003e
40f3dc2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
examples.go
test/e2e/examples.go
+39
-0
No files found.
test/e2e/examples.go
View file @
7645513d
...
@@ -305,6 +305,45 @@ var _ = Describe("Examples e2e", func() {
...
@@ -305,6 +305,45 @@ var _ = Describe("Examples e2e", func() {
checkRestart
(
"liveness-http"
,
time
.
Minute
)
checkRestart
(
"liveness-http"
,
time
.
Minute
)
})
})
})
})
Describe
(
"[Skipped][Example]Secret"
,
func
()
{
It
(
"should create a pod that reads a secret"
,
func
()
{
mkpath
:=
func
(
file
string
)
string
{
return
filepath
.
Join
(
testContext
.
RepoRoot
,
"docs"
,
"user-guide"
,
"secrets"
,
file
)
}
secretYaml
:=
mkpath
(
"secret.yaml"
)
podYaml
:=
mkpath
(
"secret-pod.yaml"
)
nsFlag
:=
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
)
By
(
"creating secret and pod"
)
runKubectl
(
"create"
,
"-f"
,
secretYaml
,
nsFlag
)
runKubectl
(
"create"
,
"-f"
,
podYaml
,
nsFlag
)
By
(
"checking if secret was read correctly"
)
_
,
err
:=
lookForStringInLog
(
ns
,
"secret-test-pod"
,
"test-container"
,
"value-1"
,
serverStartTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
})
})
Describe
(
"[Skipped][Example]Downward API"
,
func
()
{
It
(
"should create a pod that prints his name and namespace"
,
func
()
{
mkpath
:=
func
(
file
string
)
string
{
return
filepath
.
Join
(
testContext
.
RepoRoot
,
"docs"
,
"user-guide"
,
"downward-api"
,
file
)
}
podYaml
:=
mkpath
(
"dapi-pod.yaml"
)
nsFlag
:=
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
)
podName
:=
"dapi-test-pod"
By
(
"creating the pod"
)
runKubectl
(
"create"
,
"-f"
,
podYaml
,
nsFlag
)
By
(
"checking if name and namespace were passed correctly"
)
_
,
err
:=
lookForStringInLog
(
ns
,
podName
,
"test-container"
,
fmt
.
Sprintf
(
"POD_NAMESPACE=%v"
,
ns
),
serverStartTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
_
,
err
=
lookForStringInLog
(
ns
,
podName
,
"test-container"
,
fmt
.
Sprintf
(
"POD_NAME=%v"
,
podName
),
serverStartTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
})
})
})
})
func
makeHttpRequestToService
(
c
*
client
.
Client
,
ns
,
service
,
path
string
)
(
string
,
error
)
{
func
makeHttpRequestToService
(
c
*
client
.
Client
,
ns
,
service
,
path
string
)
(
string
,
error
)
{
...
...
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