Merge pull request #372 from Random-Liu/add-container-log-path

Add the missing container log path in container status.
This commit is contained in:
Lantao Liu 2017-10-30 16:57:10 +01:00 committed by GitHub
commit dcb22bebae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -74,5 +74,6 @@ func toCRIContainerStatus(container containerstore.Container, imageRef string) *
Labels: meta.Config.GetLabels(), Labels: meta.Config.GetLabels(),
Annotations: meta.Config.GetAnnotations(), Annotations: meta.Config.GetAnnotations(),
Mounts: meta.Config.GetMounts(), Mounts: meta.Config.GetMounts(),
LogPath: meta.LogPath,
} }
} }

View File

@ -54,6 +54,7 @@ func getContainerStatusTestData() (*containerstore.Metadata, *containerstore.Sta
SandboxID: "test-sandbox-id", SandboxID: "test-sandbox-id",
Config: config, Config: config,
ImageRef: "test-image-id", ImageRef: "test-image-id",
LogPath: "test-log-path",
} }
status := &containerstore.Status{ status := &containerstore.Status{
Pid: 1234, Pid: 1234,
@ -76,6 +77,7 @@ func getContainerStatusTestData() (*containerstore.Metadata, *containerstore.Sta
Labels: config.GetLabels(), Labels: config.GetLabels(),
Annotations: config.GetAnnotations(), Annotations: config.GetAnnotations(),
Mounts: config.GetMounts(), Mounts: config.GetMounts(),
LogPath: "test-log-path",
} }
return metadata, status, image, expected return metadata, status, image, expected