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
be8a0726
Commit
be8a0726
authored
May 16, 2019
by
SataQiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix golint failures of test/e2e
parent
1284c99e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
18 deletions
+17
-18
.golint_failures
hack/.golint_failures
+0
-1
examples.go
test/e2e/examples.go
+11
-11
gke_local_ssd.go
test/e2e/gke_local_ssd.go
+3
-3
gke_node_pools.go
test/e2e/gke_node_pools.go
+3
-3
No files found.
hack/.golint_failures
View file @
be8a0726
...
...
@@ -590,7 +590,6 @@ staging/src/k8s.io/sample-apiserver/pkg/apis/wardle
staging/src/k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder
test/e2e
test/e2e/autoscaling
test/e2e/chaosmonkey
test/e2e/common
...
...
test/e2e/examples.go
View file @
be8a0726
...
...
@@ -34,7 +34,7 @@ import (
e2elog
"k8s.io/kubernetes/test/e2e/framework/log"
"k8s.io/kubernetes/test/e2e/framework/testfiles"
.
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo"
)
const
(
...
...
@@ -46,7 +46,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
var
c
clientset
.
Interface
var
ns
string
BeforeEach
(
func
()
{
ginkgo
.
BeforeEach
(
func
()
{
c
=
f
.
ClientSet
ns
=
f
.
Namespace
.
Name
...
...
@@ -63,7 +63,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
})
framework
.
KubeDescribe
(
"Liveness"
,
func
()
{
It
(
"liveness pods should be automatically restarted"
,
func
()
{
ginkgo
.
It
(
"liveness pods should be automatically restarted"
,
func
()
{
test
:=
"test/fixtures/doc-yaml/user-guide/liveness"
execYaml
:=
readFile
(
test
,
"exec-liveness.yaml.in"
)
httpYaml
:=
readFile
(
test
,
"http-liveness.yaml.in"
)
...
...
@@ -94,7 +94,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
wg
.
Done
()
}
By
(
"Check restarts"
)
ginkgo
.
By
(
"Check restarts"
)
// Start the "actual test", and wait for both pods to complete.
// If 2 fail: Something is broken with the test (or maybe even with liveness).
...
...
@@ -111,7 +111,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
})
framework
.
KubeDescribe
(
"Secret"
,
func
()
{
It
(
"should create a pod that reads a secret"
,
func
()
{
ginkgo
.
It
(
"should create a pod that reads a secret"
,
func
()
{
test
:=
"test/fixtures/doc-yaml/user-guide/secrets"
secretYaml
:=
readFile
(
test
,
"secret.yaml"
)
podYaml
:=
readFile
(
test
,
"secret-pod.yaml.in"
)
...
...
@@ -119,31 +119,31 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
nsFlag
:=
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
)
podName
:=
"secret-test-pod"
By
(
"creating secret and pod"
)
ginkgo
.
By
(
"creating secret and pod"
)
framework
.
RunKubectlOrDieInput
(
secretYaml
,
"create"
,
"-f"
,
"-"
,
nsFlag
)
framework
.
RunKubectlOrDieInput
(
podYaml
,
"create"
,
"-f"
,
"-"
,
nsFlag
)
err
:=
framework
.
WaitForPodNoLongerRunningInNamespace
(
c
,
podName
,
ns
)
framework
.
ExpectNoError
(
err
)
By
(
"checking if secret was read correctly"
)
ginkgo
.
By
(
"checking if secret was read correctly"
)
_
,
err
=
framework
.
LookForStringInLog
(
ns
,
"secret-test-pod"
,
"test-container"
,
"value-1"
,
serverStartTimeout
)
framework
.
ExpectNoError
(
err
)
})
})
framework
.
KubeDescribe
(
"Downward API"
,
func
()
{
It
(
"should create a pod that prints his name and namespace"
,
func
()
{
ginkgo
.
It
(
"should create a pod that prints his name and namespace"
,
func
()
{
test
:=
"test/fixtures/doc-yaml/user-guide/downward-api"
podYaml
:=
readFile
(
test
,
"dapi-pod.yaml.in"
)
nsFlag
:=
fmt
.
Sprintf
(
"--namespace=%v"
,
ns
)
podName
:=
"dapi-test-pod"
By
(
"creating the pod"
)
ginkgo
.
By
(
"creating the pod"
)
framework
.
RunKubectlOrDieInput
(
podYaml
,
"create"
,
"-f"
,
"-"
,
nsFlag
)
err
:=
framework
.
WaitForPodNoLongerRunningInNamespace
(
c
,
podName
,
ns
)
framework
.
ExpectNoError
(
err
)
By
(
"checking if name and namespace were passed correctly"
)
ginkgo
.
By
(
"checking if name and namespace were passed correctly"
)
_
,
err
=
framework
.
LookForStringInLog
(
ns
,
podName
,
"test-container"
,
fmt
.
Sprintf
(
"MY_POD_NAMESPACE=%v"
,
ns
),
serverStartTimeout
)
framework
.
ExpectNoError
(
err
)
_
,
err
=
framework
.
LookForStringInLog
(
ns
,
podName
,
"test-container"
,
fmt
.
Sprintf
(
"MY_POD_NAME=%v"
,
podName
),
serverStartTimeout
)
...
...
@@ -154,5 +154,5 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
func
readFile
(
test
,
file
string
)
string
{
from
:=
filepath
.
Join
(
test
,
file
)
return
commonutils
.
SubstituteImageName
(
string
(
testfiles
.
ReadOrDie
(
from
,
Fail
)))
return
commonutils
.
SubstituteImageName
(
string
(
testfiles
.
ReadOrDie
(
from
,
ginkgo
.
Fail
)))
}
test/e2e/gke_local_ssd.go
View file @
be8a0726
...
...
@@ -26,18 +26,18 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
e2elog
"k8s.io/kubernetes/test/e2e/framework/log"
.
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo"
)
var
_
=
framework
.
KubeDescribe
(
"GKE local SSD [Feature:GKELocalSSD]"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"localssd"
)
BeforeEach
(
func
()
{
ginkgo
.
BeforeEach
(
func
()
{
framework
.
SkipUnlessProviderIs
(
"gke"
)
})
It
(
"should write and read from node local SSD [Feature:GKELocalSSD]"
,
func
()
{
ginkgo
.
It
(
"should write and read from node local SSD [Feature:GKELocalSSD]"
,
func
()
{
e2elog
.
Logf
(
"Start local SSD test"
)
createNodePoolWithLocalSsds
(
"np-ssd"
)
doTestWriteAndReadToLocalSsd
(
f
)
...
...
test/e2e/gke_node_pools.go
View file @
be8a0726
...
...
@@ -23,18 +23,18 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
e2elog
"k8s.io/kubernetes/test/e2e/framework/log"
.
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo"
)
var
_
=
framework
.
KubeDescribe
(
"GKE node pools [Feature:GKENodePool]"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"node-pools"
)
BeforeEach
(
func
()
{
ginkgo
.
BeforeEach
(
func
()
{
framework
.
SkipUnlessProviderIs
(
"gke"
)
})
It
(
"should create a cluster with multiple node pools [Feature:GKENodePool]"
,
func
()
{
ginkgo
.
It
(
"should create a cluster with multiple node pools [Feature:GKENodePool]"
,
func
()
{
e2elog
.
Logf
(
"Start create node pool test"
)
testCreateDeleteNodePool
(
f
,
"test-pool"
)
})
...
...
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