integration: Enable some tests for Windows (part 2)
Some of the tests that are currently running only on Linux can be made to run on Windows with a few changes. Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/containerd/containerd/containers"
|
||||
"github.com/containerd/containerd/oci"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
@@ -56,3 +57,15 @@ func withExecExitStatus(s *specs.Process, es int) {
|
||||
func withExecArgs(s *specs.Process, args ...string) {
|
||||
s.Args = args
|
||||
}
|
||||
|
||||
func newDirectIO(ctx context.Context, terminal bool) (*directIO, error) {
|
||||
fifos, err := cio.NewFIFOSetInDir("", "", terminal)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dio, err := cio.NewDirectIO(ctx, fifos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &directIO{DirectIO: *dio}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user