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
57b4c1e7
Commit
57b4c1e7
authored
Aug 15, 2018
by
hangaoshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use const v1.ProtocolTCP replace of string TCP in test/e2e/network/
parent
d655c9a8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
dns.go
test/e2e/network/dns.go
+1
-1
dns_common.go
test/e2e/network/dns_common.go
+2
-2
firewall.go
test/e2e/network/firewall.go
+1
-1
service.go
test/e2e/network/service.go
+3
-3
No files found.
test/e2e/network/dns.go
View file @
57b4c1e7
...
@@ -202,7 +202,7 @@ var _ = SIGDescribe("DNS", func() {
...
@@ -202,7 +202,7 @@ var _ = SIGDescribe("DNS", func() {
_
,
err
=
framework
.
UpdateService
(
f
.
ClientSet
,
f
.
Namespace
.
Name
,
serviceName
,
func
(
s
*
v1
.
Service
)
{
_
,
err
=
framework
.
UpdateService
(
f
.
ClientSet
,
f
.
Namespace
.
Name
,
serviceName
,
func
(
s
*
v1
.
Service
)
{
s
.
Spec
.
Type
=
v1
.
ServiceTypeClusterIP
s
.
Spec
.
Type
=
v1
.
ServiceTypeClusterIP
s
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{
s
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{
{
Port
:
80
,
Name
:
"http"
,
Protocol
:
"TCP"
},
{
Port
:
80
,
Name
:
"http"
,
Protocol
:
v1
.
ProtocolTCP
},
}
}
})
})
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
Expect
(
err
)
.
NotTo
(
HaveOccurred
())
...
...
test/e2e/network/dns_common.go
View file @
57b4c1e7
...
@@ -213,7 +213,7 @@ func (t *dnsTestCommon) createUtilPodLabel(baseName string) {
...
@@ -213,7 +213,7 @@ func (t *dnsTestCommon) createUtilPodLabel(baseName string) {
Image
:
imageutils
.
GetE2EImage
(
imageutils
.
Dnsutils
),
Image
:
imageutils
.
GetE2EImage
(
imageutils
.
Dnsutils
),
Command
:
[]
string
{
"sleep"
,
"10000"
},
Command
:
[]
string
{
"sleep"
,
"10000"
},
Ports
:
[]
v1
.
ContainerPort
{
Ports
:
[]
v1
.
ContainerPort
{
{
ContainerPort
:
servicePort
,
Protocol
:
"TCP"
},
{
ContainerPort
:
servicePort
,
Protocol
:
v1
.
ProtocolTCP
},
},
},
},
},
},
},
...
@@ -238,7 +238,7 @@ func (t *dnsTestCommon) createUtilPodLabel(baseName string) {
...
@@ -238,7 +238,7 @@ func (t *dnsTestCommon) createUtilPodLabel(baseName string) {
Selector
:
map
[
string
]
string
{
"app"
:
baseName
},
Selector
:
map
[
string
]
string
{
"app"
:
baseName
},
Ports
:
[]
v1
.
ServicePort
{
Ports
:
[]
v1
.
ServicePort
{
{
{
Protocol
:
"TCP"
,
Protocol
:
v1
.
ProtocolTCP
,
Port
:
servicePort
,
Port
:
servicePort
,
TargetPort
:
intstr
.
FromInt
(
servicePort
),
TargetPort
:
intstr
.
FromInt
(
servicePort
),
},
},
...
...
test/e2e/network/firewall.go
View file @
57b4c1e7
...
@@ -70,7 +70,7 @@ var _ = SIGDescribe("Firewall rule", func() {
...
@@ -70,7 +70,7 @@ var _ = SIGDescribe("Firewall rule", func() {
By
(
"Creating a LoadBalancer type service with ExternalTrafficPolicy=Global"
)
By
(
"Creating a LoadBalancer type service with ExternalTrafficPolicy=Global"
)
svc
:=
jig
.
CreateLoadBalancerService
(
ns
,
serviceName
,
framework
.
LoadBalancerCreateTimeoutDefault
,
func
(
svc
*
v1
.
Service
)
{
svc
:=
jig
.
CreateLoadBalancerService
(
ns
,
serviceName
,
framework
.
LoadBalancerCreateTimeoutDefault
,
func
(
svc
*
v1
.
Service
)
{
svc
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{{
Protocol
:
"TCP"
,
Port
:
framework
.
FirewallTestHttpPort
}}
svc
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{{
Protocol
:
v1
.
ProtocolTCP
,
Port
:
framework
.
FirewallTestHttpPort
}}
svc
.
Spec
.
LoadBalancerSourceRanges
=
firewallTestSourceRanges
svc
.
Spec
.
LoadBalancerSourceRanges
=
firewallTestSourceRanges
})
})
defer
func
()
{
defer
func
()
{
...
...
test/e2e/network/service.go
View file @
57b4c1e7
...
@@ -57,7 +57,7 @@ var (
...
@@ -57,7 +57,7 @@ var (
Ports
:
[]
v1
.
ServicePort
{{
Ports
:
[]
v1
.
ServicePort
{{
Port
:
int32
(
defaultServeHostnameServicePort
),
Port
:
int32
(
defaultServeHostnameServicePort
),
TargetPort
:
intstr
.
FromInt
(
9376
),
TargetPort
:
intstr
.
FromInt
(
9376
),
Protocol
:
"TCP"
,
Protocol
:
v1
.
ProtocolTCP
,
}},
}},
Selector
:
map
[
string
]
string
{
Selector
:
map
[
string
]
string
{
"name"
:
defaultServeHostnameServiceName
,
"name"
:
defaultServeHostnameServiceName
,
...
@@ -897,7 +897,7 @@ var _ = SIGDescribe("Services", func() {
...
@@ -897,7 +897,7 @@ var _ = SIGDescribe("Services", func() {
s
.
Spec
.
Type
=
v1
.
ServiceTypeClusterIP
s
.
Spec
.
Type
=
v1
.
ServiceTypeClusterIP
s
.
Spec
.
ExternalName
=
""
s
.
Spec
.
ExternalName
=
""
s
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{
s
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{
{
Port
:
80
,
Name
:
"http"
,
Protocol
:
"TCP"
},
{
Port
:
80
,
Name
:
"http"
,
Protocol
:
v1
.
ProtocolTCP
},
}
}
})
})
jig
.
SanityCheckService
(
clusterIPService
,
v1
.
ServiceTypeClusterIP
)
jig
.
SanityCheckService
(
clusterIPService
,
v1
.
ServiceTypeClusterIP
)
...
@@ -921,7 +921,7 @@ var _ = SIGDescribe("Services", func() {
...
@@ -921,7 +921,7 @@ var _ = SIGDescribe("Services", func() {
s
.
Spec
.
Type
=
v1
.
ServiceTypeNodePort
s
.
Spec
.
Type
=
v1
.
ServiceTypeNodePort
s
.
Spec
.
ExternalName
=
""
s
.
Spec
.
ExternalName
=
""
s
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{
s
.
Spec
.
Ports
=
[]
v1
.
ServicePort
{
{
Port
:
80
,
Name
:
"http"
,
Protocol
:
"TCP"
},
{
Port
:
80
,
Name
:
"http"
,
Protocol
:
v1
.
ProtocolTCP
},
}
}
})
})
jig
.
SanityCheckService
(
nodePortService
,
v1
.
ServiceTypeNodePort
)
jig
.
SanityCheckService
(
nodePortService
,
v1
.
ServiceTypeNodePort
)
...
...
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