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>
This commit is contained in:
parent
6e98a7f2c9
commit
4373547857
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…
Reference in a new issue