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
95dd65c9
Commit
95dd65c9
authored
Sep 20, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Sep 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32276 from YuPengZTE/devERR
Automatic merge from submit-queue In error, the first letter is low-case letter
parents
aa5372c5
9b3a79bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
hyperkube.go
cmd/hyperkube/hyperkube.go
+1
-1
hyperkube_test.go
cmd/hyperkube/hyperkube_test.go
+3
-3
hyperkube.go
contrib/mesos/cmd/km/hyperkube.go
+1
-1
hyperkube_test.go
contrib/mesos/cmd/km/hyperkube_test.go
+3
-3
No files found.
cmd/hyperkube/hyperkube.go
View file @
95dd65c9
...
@@ -149,7 +149,7 @@ func (hk *HyperKube) Run(args []string) error {
...
@@ -149,7 +149,7 @@ func (hk *HyperKube) Run(args []string) error {
baseCommand
=
baseCommand
+
" "
+
serverName
baseCommand
=
baseCommand
+
" "
+
serverName
args
=
args
[
1
:
]
args
=
args
[
1
:
]
}
else
{
}
else
{
err
=
errors
.
New
(
"
N
o server specified"
)
err
=
errors
.
New
(
"
n
o server specified"
)
hk
.
Printf
(
"Error: %v
\n\n
"
,
err
)
hk
.
Printf
(
"Error: %v
\n\n
"
,
err
)
hk
.
Usage
()
hk
.
Usage
()
return
err
return
err
...
...
cmd/hyperkube/hyperkube_test.go
View file @
95dd65c9
...
@@ -50,7 +50,7 @@ func testServerError(n string) *Server {
...
@@ -50,7 +50,7 @@ func testServerError(n string) *Server {
Long
:
fmt
.
Sprintf
(
"A simple server named %s that returns an error"
,
n
),
Long
:
fmt
.
Sprintf
(
"A simple server named %s that returns an error"
,
n
),
Run
:
func
(
s
*
Server
,
args
[]
string
)
error
{
Run
:
func
(
s
*
Server
,
args
[]
string
)
error
{
s
.
hk
.
Printf
(
"%s Run
\n
"
,
s
.
Name
())
s
.
hk
.
Printf
(
"%s Run
\n
"
,
s
.
Name
())
return
errors
.
New
(
"
S
erver returning error"
)
return
errors
.
New
(
"
s
erver returning error"
)
},
},
}
}
}
}
...
@@ -142,7 +142,7 @@ func TestLinkRun(t *testing.T) {
...
@@ -142,7 +142,7 @@ func TestLinkRun(t *testing.T) {
func
TestTopNoArgs
(
t
*
testing
.
T
)
{
func
TestTopNoArgs
(
t
*
testing
.
T
)
{
x
:=
runFull
(
t
,
"hyperkube"
)
x
:=
runFull
(
t
,
"hyperkube"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
N
o server specified"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
n
o server specified"
)
}
}
func
TestBadServer
(
t
*
testing
.
T
)
{
func
TestBadServer
(
t
*
testing
.
T
)
{
...
@@ -192,7 +192,7 @@ func TestServerFlagsBad(t *testing.T) {
...
@@ -192,7 +192,7 @@ func TestServerFlagsBad(t *testing.T) {
func
TestServerError
(
t
*
testing
.
T
)
{
func
TestServerError
(
t
*
testing
.
T
)
{
x
:=
runFull
(
t
,
"hyperkube test-error"
)
x
:=
runFull
(
t
,
"hyperkube test-error"
)
assert
.
Contains
(
t
,
x
.
output
,
"test-error Run"
)
assert
.
Contains
(
t
,
x
.
output
,
"test-error Run"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
S
erver returning error"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
s
erver returning error"
)
}
}
func
TestCobraCommandHelp
(
t
*
testing
.
T
)
{
func
TestCobraCommandHelp
(
t
*
testing
.
T
)
{
...
...
contrib/mesos/cmd/km/hyperkube.go
View file @
95dd65c9
...
@@ -138,7 +138,7 @@ func (hk *HyperKube) Run(args []string) error {
...
@@ -138,7 +138,7 @@ func (hk *HyperKube) Run(args []string) error {
baseCommand
=
baseCommand
+
" "
+
serverName
baseCommand
=
baseCommand
+
" "
+
serverName
args
=
args
[
1
:
]
args
=
args
[
1
:
]
}
else
{
}
else
{
err
=
errors
.
New
(
"
N
o server specified"
)
err
=
errors
.
New
(
"
n
o server specified"
)
hk
.
Printf
(
"Error: %v
\n\n
"
,
err
)
hk
.
Printf
(
"Error: %v
\n\n
"
,
err
)
hk
.
Usage
()
hk
.
Usage
()
return
err
return
err
...
...
contrib/mesos/cmd/km/hyperkube_test.go
View file @
95dd65c9
...
@@ -48,7 +48,7 @@ func testServerError(n string) *Server {
...
@@ -48,7 +48,7 @@ func testServerError(n string) *Server {
Long
:
fmt
.
Sprintf
(
"A simple server named %s that returns an error"
,
n
),
Long
:
fmt
.
Sprintf
(
"A simple server named %s that returns an error"
,
n
),
Run
:
func
(
s
*
Server
,
args
[]
string
)
error
{
Run
:
func
(
s
*
Server
,
args
[]
string
)
error
{
s
.
hk
.
Printf
(
"%s Run
\n
"
,
s
.
Name
())
s
.
hk
.
Printf
(
"%s Run
\n
"
,
s
.
Name
())
return
errors
.
New
(
"
S
erver returning error"
)
return
errors
.
New
(
"
s
erver returning error"
)
},
},
}
}
}
}
...
@@ -90,7 +90,7 @@ func TestLinkRun(t *testing.T) {
...
@@ -90,7 +90,7 @@ func TestLinkRun(t *testing.T) {
func
TestTopNoArgs
(
t
*
testing
.
T
)
{
func
TestTopNoArgs
(
t
*
testing
.
T
)
{
x
:=
runFull
(
t
,
"hyperkube"
)
x
:=
runFull
(
t
,
"hyperkube"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
N
o server specified"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
n
o server specified"
)
}
}
func
TestBadServer
(
t
*
testing
.
T
)
{
func
TestBadServer
(
t
*
testing
.
T
)
{
...
@@ -140,5 +140,5 @@ func TestServerFlagsBad(t *testing.T) {
...
@@ -140,5 +140,5 @@ func TestServerFlagsBad(t *testing.T) {
func
TestServerError
(
t
*
testing
.
T
)
{
func
TestServerError
(
t
*
testing
.
T
)
{
x
:=
runFull
(
t
,
"hyperkube test-error"
)
x
:=
runFull
(
t
,
"hyperkube test-error"
)
assert
.
Contains
(
t
,
x
.
output
,
"test-error Run"
)
assert
.
Contains
(
t
,
x
.
output
,
"test-error Run"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
S
erver returning error"
)
assert
.
EqualError
(
t
,
x
.
err
,
"
s
erver returning error"
)
}
}
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