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
02af4b31
Commit
02af4b31
authored
Jun 02, 2017
by
zhangxiaoyu-zidif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use t.Fatalf instead
parent
7043372d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
run_test.go
pkg/kubectl/cmd/run_test.go
+2
-4
No files found.
pkg/kubectl/cmd/run_test.go
View file @
02af4b31
...
@@ -297,14 +297,12 @@ func TestGenerateService(t *testing.T) {
...
@@ -297,14 +297,12 @@ func TestGenerateService(t *testing.T) {
body
:=
objBody
(
codec
,
&
test
.
service
)
body
:=
objBody
(
codec
,
&
test
.
service
)
data
,
err
:=
ioutil
.
ReadAll
(
req
.
Body
)
data
,
err
:=
ioutil
.
ReadAll
(
req
.
Body
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
t
.
Fatalf
(
"unexpected error: %v"
,
err
)
t
.
FailNow
()
}
}
defer
req
.
Body
.
Close
()
defer
req
.
Body
.
Close
()
svc
:=
&
api
.
Service
{}
svc
:=
&
api
.
Service
{}
if
err
:=
runtime
.
DecodeInto
(
codec
,
data
,
svc
);
err
!=
nil
{
if
err
:=
runtime
.
DecodeInto
(
codec
,
data
,
svc
);
err
!=
nil
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
t
.
Fatalf
(
"unexpected error: %v"
,
err
)
t
.
FailNow
()
}
}
// Copy things that are defaulted by the system
// Copy things that are defaulted by the system
test
.
service
.
Annotations
=
svc
.
Annotations
test
.
service
.
Annotations
=
svc
.
Annotations
...
...
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