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
1ce7b0b2
Commit
1ce7b0b2
authored
Feb 25, 2019
by
danielqsj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix golint failures for test/e2e/ui
parent
d48eb30c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
.golint_failures
hack/.golint_failures
+0
-1
dashboard.go
test/e2e/ui/dashboard.go
+10
-10
framework.go
test/e2e/ui/framework.go
+1
-0
No files found.
hack/.golint_failures
View file @
1ce7b0b2
...
@@ -672,7 +672,6 @@ test/e2e/storage/drivers
...
@@ -672,7 +672,6 @@ test/e2e/storage/drivers
test/e2e/storage/testsuites
test/e2e/storage/testsuites
test/e2e/storage/utils
test/e2e/storage/utils
test/e2e/storage/vsphere
test/e2e/storage/vsphere
test/e2e/ui
test/e2e/windows
test/e2e/windows
test/e2e_kubeadm
test/e2e_kubeadm
test/e2e_node
test/e2e_node
...
...
test/e2e/ui/dashboard.go
View file @
1ce7b0b2
...
@@ -28,12 +28,12 @@ import (
...
@@ -28,12 +28,12 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework"
testutils
"k8s.io/kubernetes/test/utils"
testutils
"k8s.io/kubernetes/test/utils"
.
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo"
.
"github.com/onsi/gomega"
"github.com/onsi/gomega"
)
)
var
_
=
SIGDescribe
(
"Kubernetes Dashboard"
,
func
()
{
var
_
=
SIGDescribe
(
"Kubernetes Dashboard"
,
func
()
{
BeforeEach
(
func
()
{
ginkgo
.
BeforeEach
(
func
()
{
// TODO(kubernetes/kubernetes#61559): Enable dashboard here rather than skip the test.
// TODO(kubernetes/kubernetes#61559): Enable dashboard here rather than skip the test.
framework
.
SkipIfProviderIs
(
"gke"
)
framework
.
SkipIfProviderIs
(
"gke"
)
})
})
...
@@ -49,17 +49,17 @@ var _ = SIGDescribe("Kubernetes Dashboard", func() {
...
@@ -49,17 +49,17 @@ var _ = SIGDescribe("Kubernetes Dashboard", func() {
f
:=
framework
.
NewDefaultFramework
(
uiServiceName
)
f
:=
framework
.
NewDefaultFramework
(
uiServiceName
)
It
(
"should check that the kubernetes-dashboard instance is alive"
,
func
()
{
ginkgo
.
It
(
"should check that the kubernetes-dashboard instance is alive"
,
func
()
{
By
(
"Checking whether the kubernetes-dashboard service exists."
)
ginkgo
.
By
(
"Checking whether the kubernetes-dashboard service exists."
)
err
:=
framework
.
WaitForService
(
f
.
ClientSet
,
uiNamespace
,
uiServiceName
,
true
,
framework
.
Poll
,
framework
.
ServiceStartTimeout
)
err
:=
framework
.
WaitForService
(
f
.
ClientSet
,
uiNamespace
,
uiServiceName
,
true
,
framework
.
Poll
,
framework
.
ServiceStartTimeout
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
gomega
.
Expect
(
err
)
.
NotTo
(
gomega
.
HaveOccurred
())
By
(
"Checking to make sure the kubernetes-dashboard pods are running"
)
ginkgo
.
By
(
"Checking to make sure the kubernetes-dashboard pods are running"
)
selector
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"k8s-app"
:
uiAppName
}))
selector
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"k8s-app"
:
uiAppName
}))
err
=
testutils
.
WaitForPodsWithLabelRunning
(
f
.
ClientSet
,
uiNamespace
,
selector
)
err
=
testutils
.
WaitForPodsWithLabelRunning
(
f
.
ClientSet
,
uiNamespace
,
selector
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
gomega
.
Expect
(
err
)
.
NotTo
(
gomega
.
HaveOccurred
())
By
(
"Checking to make sure we get a response from the kubernetes-dashboard."
)
ginkgo
.
By
(
"Checking to make sure we get a response from the kubernetes-dashboard."
)
err
=
wait
.
Poll
(
framework
.
Poll
,
serverStartTimeout
,
func
()
(
bool
,
error
)
{
err
=
wait
.
Poll
(
framework
.
Poll
,
serverStartTimeout
,
func
()
(
bool
,
error
)
{
var
status
int
var
status
int
proxyRequest
,
errProxy
:=
framework
.
GetServicesProxyRequest
(
f
.
ClientSet
,
f
.
ClientSet
.
CoreV1
()
.
RESTClient
()
.
Get
())
proxyRequest
,
errProxy
:=
framework
.
GetServicesProxyRequest
(
f
.
ClientSet
,
f
.
ClientSet
.
CoreV1
()
.
RESTClient
()
.
Get
())
...
@@ -90,6 +90,6 @@ var _ = SIGDescribe("Kubernetes Dashboard", func() {
...
@@ -90,6 +90,6 @@ var _ = SIGDescribe("Kubernetes Dashboard", func() {
// Don't return err here as it aborts polling.
// Don't return err here as it aborts polling.
return
status
==
http
.
StatusOK
,
nil
return
status
==
http
.
StatusOK
,
nil
})
})
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
gomega
.
Expect
(
err
)
.
NotTo
(
gomega
.
HaveOccurred
())
})
})
})
})
test/e2e/ui/framework.go
View file @
1ce7b0b2
...
@@ -18,6 +18,7 @@ package ui
...
@@ -18,6 +18,7 @@ package ui
import
"github.com/onsi/ginkgo"
import
"github.com/onsi/ginkgo"
// SIGDescribe annotates the test with the SIG label.
func
SIGDescribe
(
text
string
,
body
func
())
bool
{
func
SIGDescribe
(
text
string
,
body
func
())
bool
{
return
ginkgo
.
Describe
(
"[sig-ui] "
+
text
,
body
)
return
ginkgo
.
Describe
(
"[sig-ui] "
+
text
,
body
)
}
}
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