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
a3a61946
Commit
a3a61946
authored
May 11, 2017
by
zhengjiajin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BY() format
parent
1f3b158a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
portforward.go
test/e2e/portforward.go
+7
-7
No files found.
test/e2e/portforward.go
View file @
a3a61946
...
...
@@ -206,7 +206,7 @@ func runPortForward(ns, podName string, port int) *portForwardCommand {
}
func
doTestConnectSendDisconnect
(
bindAddress
string
,
f
*
framework
.
Framework
)
{
By
(
"
c
reating the target pod"
)
By
(
"
C
reating the target pod"
)
pod
:=
pfPod
(
""
,
"10"
,
"10"
,
"100"
,
fmt
.
Sprintf
(
"%s"
,
bindAddress
))
if
_
,
err
:=
f
.
ClientSet
.
Core
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
);
err
!=
nil
{
framework
.
Failf
(
"Couldn't create pod: %v"
,
err
)
...
...
@@ -262,7 +262,7 @@ func doTestConnectSendDisconnect(bindAddress string, f *framework.Framework) {
}
func
doTestMustConnectSendNothing
(
bindAddress
string
,
f
*
framework
.
Framework
)
{
By
(
"
c
reating the target pod"
)
By
(
"
C
reating the target pod"
)
pod
:=
pfPod
(
"abc"
,
"1"
,
"1"
,
"1"
,
fmt
.
Sprintf
(
"%s"
,
bindAddress
))
if
_
,
err
:=
f
.
ClientSet
.
Core
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
);
err
!=
nil
{
framework
.
Failf
(
"Couldn't create pod: %v"
,
err
)
...
...
@@ -307,7 +307,7 @@ func doTestMustConnectSendNothing(bindAddress string, f *framework.Framework) {
}
func
doTestMustConnectSendDisconnect
(
bindAddress
string
,
f
*
framework
.
Framework
)
{
By
(
"
c
reating the target pod"
)
By
(
"
C
reating the target pod"
)
pod
:=
pfPod
(
"abc"
,
"10"
,
"10"
,
"100"
,
fmt
.
Sprintf
(
"%s"
,
bindAddress
))
if
_
,
err
:=
f
.
ClientSet
.
Core
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
);
err
!=
nil
{
framework
.
Failf
(
"Couldn't create pod: %v"
,
err
)
...
...
@@ -377,7 +377,7 @@ func doTestOverWebSockets(bindAddress string, f *framework.Framework) {
config
,
err
:=
framework
.
LoadConfig
()
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"unable to get base config"
)
By
(
"
c
reating the pod"
)
By
(
"
C
reating the pod"
)
pod
:=
pfPod
(
"def"
,
"10"
,
"10"
,
"100"
,
fmt
.
Sprintf
(
"%s"
,
bindAddress
))
if
_
,
err
:=
f
.
ClientSet
.
Core
()
.
Pods
(
f
.
Namespace
.
Name
)
.
Create
(
pod
);
err
!=
nil
{
framework
.
Failf
(
"Couldn't create pod: %v"
,
err
)
...
...
@@ -436,13 +436,13 @@ func doTestOverWebSockets(bindAddress string, f *framework.Framework) {
return
nil
},
time
.
Minute
,
10
*
time
.
Second
)
.
Should
(
BeNil
())
By
(
"
s
ending the expected data to the local port"
)
By
(
"
S
ending the expected data to the local port"
)
err
=
wsWrite
(
ws
,
0
,
[]
byte
(
"def"
))
if
err
!=
nil
{
framework
.
Failf
(
"Failed to write to websocket %s: %v"
,
url
.
String
(),
err
)
}
By
(
"
r
eading data from the local port"
)
By
(
"
R
eading data from the local port"
)
buf
:=
bytes
.
Buffer
{}
expectedData
:=
bytes
.
Repeat
([]
byte
(
"x"
),
100
)
Eventually
(
func
()
error
{
...
...
@@ -460,7 +460,7 @@ func doTestOverWebSockets(bindAddress string, f *framework.Framework) {
return
nil
},
time
.
Minute
,
10
*
time
.
Second
)
.
Should
(
BeNil
())
By
(
"
v
erifying logs"
)
By
(
"
V
erifying logs"
)
logOutput
,
err
:=
framework
.
GetPodLogs
(
f
.
ClientSet
,
f
.
Namespace
.
Name
,
pod
.
Name
,
"portforwardtester"
)
if
err
!=
nil
{
framework
.
Failf
(
"Error retrieving pod logs: %v"
,
err
)
...
...
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