Add testenv.UsingSnapshotter utility
To allow skipping integration tests that don't apply to the
containerd snapshotter.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 4373547857
)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
7d50989467
commit
8a4b7c5af8
1 changed files with 7 additions and 0 deletions
|
@ -193,6 +193,13 @@ func (e *Execution) IsUserNamespaceInKernel() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// UsingSnapshotter returns whether containerd snapshotters are used for the
|
||||
// tests by checking if the "TEST_INTEGRATION_USE_SNAPSHOTTER" is set to a
|
||||
// non-empty value.
|
||||
func (e *Execution) UsingSnapshotter() bool {
|
||||
return os.Getenv("TEST_INTEGRATION_USE_SNAPSHOTTER") != ""
|
||||
}
|
||||
|
||||
// HasExistingImage checks whether there is an image with the given reference.
|
||||
// Note that this is done by filtering and then checking whether there were any
|
||||
// results -- so ambiguous references might result in false-positives.
|
||||
|
|
Loading…
Add table
Reference in a new issue