mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Adding builder version
Signed-off-by: Krystian Wojcicki <kwojcicki@sympatico.ca>
This commit is contained in:
parent
5ec31380a5
commit
f821f002e5
3 changed files with 5 additions and 1 deletions
|
@ -44,6 +44,8 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
|
||||||
info.Swarm = s.cluster.Info()
|
info.Swarm = s.cluster.Info()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info.Builder = build.BuilderVersion(*s.features)
|
||||||
|
|
||||||
if versions.LessThan(httputils.VersionFromContext(ctx), "1.25") {
|
if versions.LessThan(httputils.VersionFromContext(ctx), "1.25") {
|
||||||
// TODO: handle this conversion in engine-api
|
// TODO: handle this conversion in engine-api
|
||||||
type oldInfo struct {
|
type oldInfo struct {
|
||||||
|
|
|
@ -146,6 +146,7 @@ type Commit struct {
|
||||||
// GET "/info"
|
// GET "/info"
|
||||||
type Info struct {
|
type Info struct {
|
||||||
ID string
|
ID string
|
||||||
|
Builder BuilderVersion
|
||||||
Containers int
|
Containers int
|
||||||
ContainersRunning int
|
ContainersRunning int
|
||||||
ContainersPaused int
|
ContainersPaused int
|
||||||
|
|
|
@ -35,7 +35,8 @@ func TestInfoAPI(t *testing.T) {
|
||||||
"KernelVersion",
|
"KernelVersion",
|
||||||
"Driver",
|
"Driver",
|
||||||
"ServerVersion",
|
"ServerVersion",
|
||||||
"SecurityOptions"}
|
"SecurityOptions",
|
||||||
|
"Builder"}
|
||||||
|
|
||||||
out := fmt.Sprintf("%+v", info)
|
out := fmt.Sprintf("%+v", info)
|
||||||
for _, linePrefix := range stringsToCheck {
|
for _, linePrefix := range stringsToCheck {
|
||||||
|
|
Loading…
Add table
Reference in a new issue