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
a98f556d
Commit
a98f556d
authored
Feb 04, 2016
by
Tim Hockin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaner service e2e strings
parent
8d5ad91f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
service.go
test/e2e/service.go
+10
-10
No files found.
test/e2e/service.go
View file @
a98f556d
...
@@ -461,7 +461,7 @@ var _ = Describe("Services", func() {
...
@@ -461,7 +461,7 @@ var _ = Describe("Services", func() {
// Change the services to NodePort.
// Change the services to NodePort.
By
(
"changing the TCP service
"
+
serviceName
+
"
to type=NodePort"
)
By
(
"changing the TCP service to type=NodePort"
)
tcpService
=
jig
.
UpdateServiceOrFail
(
ns1
,
tcpService
.
Name
,
func
(
s
*
api
.
Service
)
{
tcpService
=
jig
.
UpdateServiceOrFail
(
ns1
,
tcpService
.
Name
,
func
(
s
*
api
.
Service
)
{
s
.
Spec
.
Type
=
api
.
ServiceTypeNodePort
s
.
Spec
.
Type
=
api
.
ServiceTypeNodePort
})
})
...
@@ -469,7 +469,7 @@ var _ = Describe("Services", func() {
...
@@ -469,7 +469,7 @@ var _ = Describe("Services", func() {
tcpNodePort
:=
tcpService
.
Spec
.
Ports
[
0
]
.
NodePort
tcpNodePort
:=
tcpService
.
Spec
.
Ports
[
0
]
.
NodePort
Logf
(
"TCP node port: %d"
,
tcpNodePort
)
Logf
(
"TCP node port: %d"
,
tcpNodePort
)
By
(
"changing the UDP service
"
+
serviceName
+
"
to type=NodePort"
)
By
(
"changing the UDP service to type=NodePort"
)
udpService
=
jig
.
UpdateServiceOrFail
(
ns2
,
udpService
.
Name
,
func
(
s
*
api
.
Service
)
{
udpService
=
jig
.
UpdateServiceOrFail
(
ns2
,
udpService
.
Name
,
func
(
s
*
api
.
Service
)
{
s
.
Spec
.
Type
=
api
.
ServiceTypeNodePort
s
.
Spec
.
Type
=
api
.
ServiceTypeNodePort
})
})
...
@@ -499,18 +499,18 @@ var _ = Describe("Services", func() {
...
@@ -499,18 +499,18 @@ var _ = Describe("Services", func() {
Logf
(
"Allocated static load balancer IP: %s"
,
requestedIP
)
Logf
(
"Allocated static load balancer IP: %s"
,
requestedIP
)
}
}
By
(
"changing the TCP service
"
+
serviceName
+
"
to type=LoadBalancer"
)
By
(
"changing the TCP service to type=LoadBalancer"
)
tcpService
=
jig
.
UpdateServiceOrFail
(
ns1
,
tcpService
.
Name
,
func
(
s
*
api
.
Service
)
{
tcpService
=
jig
.
UpdateServiceOrFail
(
ns1
,
tcpService
.
Name
,
func
(
s
*
api
.
Service
)
{
s
.
Spec
.
LoadBalancerIP
=
requestedIP
// will be "" if not applicable
s
.
Spec
.
LoadBalancerIP
=
requestedIP
// will be "" if not applicable
s
.
Spec
.
Type
=
api
.
ServiceTypeLoadBalancer
s
.
Spec
.
Type
=
api
.
ServiceTypeLoadBalancer
})
})
By
(
"changing the UDP service
"
+
serviceName
+
"
to type=LoadBalancer"
)
By
(
"changing the UDP service to type=LoadBalancer"
)
udpService
=
jig
.
UpdateServiceOrFail
(
ns2
,
udpService
.
Name
,
func
(
s
*
api
.
Service
)
{
udpService
=
jig
.
UpdateServiceOrFail
(
ns2
,
udpService
.
Name
,
func
(
s
*
api
.
Service
)
{
s
.
Spec
.
Type
=
api
.
ServiceTypeLoadBalancer
s
.
Spec
.
Type
=
api
.
ServiceTypeLoadBalancer
})
})
By
(
"waiting for the TCP service
"
+
serviceName
+
"
to have a load balancer"
)
By
(
"waiting for the TCP service to have a load balancer"
)
// Wait for the load balancer to be created asynchronously
// Wait for the load balancer to be created asynchronously
tcpService
=
jig
.
WaitForLoadBalancerOrFail
(
ns1
,
tcpService
.
Name
)
tcpService
=
jig
.
WaitForLoadBalancerOrFail
(
ns1
,
tcpService
.
Name
)
jig
.
SanityCheckService
(
tcpService
,
api
.
ServiceTypeLoadBalancer
)
jig
.
SanityCheckService
(
tcpService
,
api
.
ServiceTypeLoadBalancer
)
...
@@ -523,7 +523,7 @@ var _ = Describe("Services", func() {
...
@@ -523,7 +523,7 @@ var _ = Describe("Services", func() {
tcpIngressIP
:=
getIngressPoint
(
&
tcpService
.
Status
.
LoadBalancer
.
Ingress
[
0
])
tcpIngressIP
:=
getIngressPoint
(
&
tcpService
.
Status
.
LoadBalancer
.
Ingress
[
0
])
Logf
(
"TCP load balancer: %s"
,
tcpIngressIP
)
Logf
(
"TCP load balancer: %s"
,
tcpIngressIP
)
By
(
"waiting for the UDP service
"
+
serviceName
+
"
to have a load balancer"
)
By
(
"waiting for the UDP service to have a load balancer"
)
// 2nd one should be faster since they ran in parallel.
// 2nd one should be faster since they ran in parallel.
udpService
=
jig
.
WaitForLoadBalancerOrFail
(
ns2
,
udpService
.
Name
)
udpService
=
jig
.
WaitForLoadBalancerOrFail
(
ns2
,
udpService
.
Name
)
jig
.
SanityCheckService
(
udpService
,
api
.
ServiceTypeLoadBalancer
)
jig
.
SanityCheckService
(
udpService
,
api
.
ServiceTypeLoadBalancer
)
...
@@ -552,7 +552,7 @@ var _ = Describe("Services", func() {
...
@@ -552,7 +552,7 @@ var _ = Describe("Services", func() {
// Change the services' node ports.
// Change the services' node ports.
By
(
"changing the TCP service's
"
+
serviceName
+
"
NodePort"
)
By
(
"changing the TCP service's NodePort"
)
tcpService
=
jig
.
ChangeServiceNodePortOrFail
(
ns1
,
tcpService
.
Name
,
tcpNodePort
)
tcpService
=
jig
.
ChangeServiceNodePortOrFail
(
ns1
,
tcpService
.
Name
,
tcpNodePort
)
jig
.
SanityCheckService
(
tcpService
,
api
.
ServiceTypeLoadBalancer
)
jig
.
SanityCheckService
(
tcpService
,
api
.
ServiceTypeLoadBalancer
)
tcpNodePortOld
:=
tcpNodePort
tcpNodePortOld
:=
tcpNodePort
...
@@ -565,7 +565,7 @@ var _ = Describe("Services", func() {
...
@@ -565,7 +565,7 @@ var _ = Describe("Services", func() {
}
}
Logf
(
"TCP node port: %d"
,
tcpNodePort
)
Logf
(
"TCP node port: %d"
,
tcpNodePort
)
By
(
"changing the UDP service's
"
+
serviceName
+
"
NodePort"
)
By
(
"changing the UDP service's NodePort"
)
udpService
=
jig
.
ChangeServiceNodePortOrFail
(
ns2
,
udpService
.
Name
,
udpNodePort
)
udpService
=
jig
.
ChangeServiceNodePortOrFail
(
ns2
,
udpService
.
Name
,
udpNodePort
)
jig
.
SanityCheckService
(
udpService
,
api
.
ServiceTypeLoadBalancer
)
jig
.
SanityCheckService
(
udpService
,
api
.
ServiceTypeLoadBalancer
)
udpNodePortOld
:=
udpNodePort
udpNodePortOld
:=
udpNodePort
...
@@ -645,7 +645,7 @@ var _ = Describe("Services", func() {
...
@@ -645,7 +645,7 @@ var _ = Describe("Services", func() {
// Change the services back to ClusterIP.
// Change the services back to ClusterIP.
By
(
"changing TCP service
"
+
serviceName
+
"
back to type=ClusterIP"
)
By
(
"changing TCP service back to type=ClusterIP"
)
tcpService
=
jig
.
UpdateServiceOrFail
(
ns1
,
tcpService
.
Name
,
func
(
s
*
api
.
Service
)
{
tcpService
=
jig
.
UpdateServiceOrFail
(
ns1
,
tcpService
.
Name
,
func
(
s
*
api
.
Service
)
{
s
.
Spec
.
Type
=
api
.
ServiceTypeClusterIP
s
.
Spec
.
Type
=
api
.
ServiceTypeClusterIP
s
.
Spec
.
Ports
[
0
]
.
NodePort
=
0
s
.
Spec
.
Ports
[
0
]
.
NodePort
=
0
...
@@ -654,7 +654,7 @@ var _ = Describe("Services", func() {
...
@@ -654,7 +654,7 @@ var _ = Describe("Services", func() {
tcpService
=
jig
.
WaitForLoadBalancerDestroyOrFail
(
ns1
,
tcpService
.
Name
,
tcpIngressIP
,
svcPort
)
tcpService
=
jig
.
WaitForLoadBalancerDestroyOrFail
(
ns1
,
tcpService
.
Name
,
tcpIngressIP
,
svcPort
)
jig
.
SanityCheckService
(
tcpService
,
api
.
ServiceTypeClusterIP
)
jig
.
SanityCheckService
(
tcpService
,
api
.
ServiceTypeClusterIP
)
By
(
"changing UDP service
"
+
serviceName
+
"
back to type=ClusterIP"
)
By
(
"changing UDP service back to type=ClusterIP"
)
udpService
=
jig
.
UpdateServiceOrFail
(
ns2
,
udpService
.
Name
,
func
(
s
*
api
.
Service
)
{
udpService
=
jig
.
UpdateServiceOrFail
(
ns2
,
udpService
.
Name
,
func
(
s
*
api
.
Service
)
{
s
.
Spec
.
Type
=
api
.
ServiceTypeClusterIP
s
.
Spec
.
Type
=
api
.
ServiceTypeClusterIP
s
.
Spec
.
Ports
[
0
]
.
NodePort
=
0
s
.
Spec
.
Ports
[
0
]
.
NodePort
=
0
...
...
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