FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker/integration-cli/docker_api_version_test.go at master · Eagle-X/docker · GitHub
Eagle-X
/
docker
Public
forked from
moby/moby
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
docker
/
integration-cli
/
docker_api_version_test.go
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (20 loc) · 524 Bytes
Breadcrumbs
docker
/
integration-cli
/
docker_api_version_test.go
Copy path
File metadata and controls
25 lines (20 loc) · 524 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package
main
import
(
"encoding/json"
"net/http"
"github.com/docker/docker/api/types"
"github.com/docker/docker/autogen/dockerversion"
"github.com/go-check/check"
)
func
(
s
*
DockerSuite
)
TestGetVersion
(
c
*
check.
C
) {
status
,
body
,
err
:=
sockRequest
(
"GET"
,
"/version"
,
nil
)
c
.
Assert
(
status
,
check
.
Equals
,
http
.
StatusOK
)
c
.
Assert
(
err
,
check
.
IsNil
)
var
v
types.
Version
if
err
:=
json
.
Unmarshal
(
body
,
&
v
);
err
!=
nil
{
c
.
Fatal
(
err
)
}
if
v
.
Version
!=
dockerversion
.
VERSION
{
c
.
Fatal
(
"Version mismatch"
)
}
}
Back
|
FazBrowse Home
|
New Git URL