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
e4bdfd05
Commit
e4bdfd05
authored
Mar 04, 2015
by
Jeff Lowdermilk
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5060 from roberthbailey/kubectl-e2e-panic
Check for non-200 responses separately from errors from the http get.
parents
a68779df
55f2da3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
kubectl.go
test/e2e/kubectl.go
+4
-1
No files found.
test/e2e/kubectl.go
View file @
e4bdfd05
...
@@ -193,9 +193,12 @@ type updateDemoData struct {
...
@@ -193,9 +193,12 @@ type updateDemoData struct {
func
getData
(
podID
string
)
(
*
updateDemoData
,
error
)
{
func
getData
(
podID
string
)
(
*
updateDemoData
,
error
)
{
resp
,
err
:=
http
.
Get
(
fmt
.
Sprintf
(
"http://localhost:%d/api/v1beta1/proxy/pods/%s/data.json"
,
kubectlProxyPort
,
podID
))
resp
,
err
:=
http
.
Get
(
fmt
.
Sprintf
(
"http://localhost:%d/api/v1beta1/proxy/pods/%s/data.json"
,
kubectlProxyPort
,
podID
))
if
err
!=
nil
||
resp
.
StatusCode
!=
200
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
if
resp
.
StatusCode
!=
200
{
return
nil
,
fmt
.
Errorf
(
"received non-200 status code from master: %d"
,
resp
.
StatusCode
)
}
defer
resp
.
Body
.
Close
()
defer
resp
.
Body
.
Close
()
body
,
err
:=
ioutil
.
ReadAll
(
resp
.
Body
)
body
,
err
:=
ioutil
.
ReadAll
(
resp
.
Body
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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