mirror of
https://github.com/containers/podman.git
synced 2025-08-26 03:01:31 +08:00
system-reset: use CleanCacheMount to clear build cache
Just like buildkit buildah must allow cleaning the buildcache and cache generated on host by --mount=type=cache just like buildkit's prune command. See: https://github.com/moby/buildkit#cache Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
@ -874,4 +874,20 @@ RUN ls /dev/test1`, ALPINE)
|
||||
build.WaitWithDefaultTimeout()
|
||||
Expect(build).To(Exit(0))
|
||||
})
|
||||
|
||||
It("podman system reset must clean host shared cache", func() {
|
||||
SkipIfRemote("podman-remote does not have system reset -f")
|
||||
podmanTest.AddImageToRWStore(ALPINE)
|
||||
session := podmanTest.Podman([]string{"build", "--pull-never", "--file", "build/cache/Dockerfilecachewrite", "build/cache/"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"system", "reset", "-f"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"build", "--pull-never", "--file", "build/cache/Dockerfilecacheread", "build/cache/"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(1))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user