test add tests to spec_opts
Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> test func WithDefaultPathEnv & WithDefaultSpecForPlatform Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> fix nil context Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> [test] TTY information && ProcessCwd Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> fix TestWithTTYSize value Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> test WithUserNamespace sets the uid and gid mappings for the task Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> format test file Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> update TestWithUserNamespace check condition Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> relaunch ci Signed-off-by: fahedouch <fahed.dorgaa@gmail.com> improve spec_opts_test test coverage Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>
This commit is contained in:
@@ -223,6 +223,32 @@ func TestWithCapabilitiesNil(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPopulateDefaultWindowsSpec(t *testing.T) {
|
||||
var (
|
||||
c = containers.Container{ID: "TestWithDefaultSpec"}
|
||||
ctx = namespaces.WithNamespace(context.Background(), "test")
|
||||
)
|
||||
var expected Spec
|
||||
|
||||
populateDefaultWindowsSpec(ctx, &expected, c.ID)
|
||||
if expected.Windows == nil {
|
||||
t.Error("Cannot populate windows Spec")
|
||||
}
|
||||
}
|
||||
|
||||
func TestPopulateDefaultUnixSpec(t *testing.T) {
|
||||
var (
|
||||
c = containers.Container{ID: "TestWithDefaultSpec"}
|
||||
ctx = namespaces.WithNamespace(context.Background(), "test")
|
||||
)
|
||||
var expected Spec
|
||||
|
||||
populateDefaultUnixSpec(ctx, &expected, c.ID)
|
||||
if expected.Linux == nil {
|
||||
t.Error("Cannot populate Unix Spec")
|
||||
}
|
||||
}
|
||||
|
||||
func TestWithPrivileged(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
Reference in New Issue
Block a user