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.Builder = build.BuilderVersion(*s.features)
|
||||
|
||||
if versions.LessThan(httputils.VersionFromContext(ctx), "1.25") {
|
||||
// TODO: handle this conversion in engine-api
|
||||
type oldInfo struct {
|
||||
|
|
|
@ -146,6 +146,7 @@ type Commit struct {
|
|||
// GET "/info"
|
||||
type Info struct {
|
||||
ID string
|
||||
Builder BuilderVersion
|
||||
Containers int
|
||||
ContainersRunning int
|
||||
ContainersPaused int
|
||||
|
|
|
@ -35,7 +35,8 @@ func TestInfoAPI(t *testing.T) {
|
|||
"KernelVersion",
|
||||
"Driver",
|
||||
"ServerVersion",
|
||||
"SecurityOptions"}
|
||||
"SecurityOptions",
|
||||
"Builder"}
|
||||
|
||||
out := fmt.Sprintf("%+v", info)
|
||||
for _, linePrefix := range stringsToCheck {
|
||||
|
|
Loading…
Reference in a new issue