mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
Fix handling of remove --log-rusage param
Fixes: https://github.com/containers/podman/issues/9889 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -349,6 +349,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
|
||||
Jobs: &jobs,
|
||||
Labels: labels,
|
||||
Layers: query.Layers,
|
||||
LogRusage: query.LogRusage,
|
||||
Manifest: query.Manifest,
|
||||
MaxPullPushRetries: 3,
|
||||
NamespaceOptions: nsoptions,
|
||||
|
@ -549,4 +549,21 @@ RUN echo hello`, ALPINE)
|
||||
inspect.WaitWithDefaultTimeout()
|
||||
Expect(inspect.OutputToString()).To(Equal("1970-01-01 00:00:00 +0000 UTC"))
|
||||
})
|
||||
|
||||
It("podman build --log-rusage", func() {
|
||||
targetPath, err := CreateTempDirInTempDir()
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
containerFile := filepath.Join(targetPath, "Containerfile")
|
||||
content := `FROM scratch`
|
||||
|
||||
Expect(ioutil.WriteFile(containerFile, []byte(content), 0755)).To(BeNil())
|
||||
|
||||
session := podmanTest.Podman([]string{"build", "--log-rusage", "--pull-never", targetPath})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("(system)"))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("(user)"))
|
||||
Expect(session.OutputToString()).To(ContainSubstring("(elapsed)"))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user