mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 00:45:43 +03:00
* Docker for Windows does not support ulimits
* Use filepath.ToSlash to test workdir
* Convert expected mount paths to system style
* Skip security-opt test on windows
- Windows does not support seccomp, and it's unclear which options are
available.
* Skip StartN due to lack of sigint
* docker: Use api to get image info on windows
* No bridge on windows
* Stop hardcoding /bin/
19 lines
488 B
Go
19 lines
488 B
Go
package docker
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestIsParentPath(t *testing.T) {
|
|
require.True(t, isParentPath("/a/b/c", "/a/b/c"))
|
|
require.True(t, isParentPath("/a/b/c", "/a/b/c/d"))
|
|
require.True(t, isParentPath("/a/b/c", "/a/b/c/d/e"))
|
|
|
|
require.False(t, isParentPath("/a/b/c", "/a/b/d"))
|
|
require.False(t, isParentPath("/a/b/c", "/a/b/cd"))
|
|
require.False(t, isParentPath("/a/b/c", "/a/d/c"))
|
|
require.False(t, isParentPath("/a/b/c", "/d/e/c"))
|
|
}
|