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
888a4881
Commit
888a4881
authored
Oct 06, 2015
by
Avesh Agarwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds new tests and increases code coverage.
parent
8fb96aff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
server_test.go
cmd/kube-proxy/app/server_test.go
+22
-0
No files found.
cmd/kube-proxy/app/server_test.go
View file @
888a4881
...
...
@@ -19,6 +19,7 @@ package app
import
(
"testing"
"github.com/stretchr/testify/assert"
"k8s.io/kubernetes/pkg/api"
)
...
...
@@ -59,3 +60,24 @@ func Test_mayTryIptablesProxy(t *testing.T) {
}
}
}
//This test verifies that Proxy Server does not crash that means
//Config and iptinterface are not nil when CleanupAndExit is true.
//To avoid proxy crash: https://github.com/kubernetes/kubernetes/pull/14736
func
TestProxyServerWithCleanupAndExit
(
t
*
testing
.
T
)
{
//creates default config
config
:=
NewProxyConfig
()
//sets CleanupAndExit manually
config
.
CleanupAndExit
=
true
//creates new proxy server
proxyserver
,
err
:=
NewProxyServerDefault
(
config
)
//verifies that nothing is nill except error
assert
.
Nil
(
t
,
err
)
assert
.
NotNil
(
t
,
proxyserver
)
assert
.
NotNil
(
t
,
proxyserver
.
Config
)
assert
.
NotNil
(
t
,
proxyserver
.
IptInterface
)
}
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