Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
  • Loading branch information
fahedouch committed Apr 2, 2024
1 parent c3ab348 commit 2627516
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmd/containerd-shim-runc-v2/process/io_test.go
Expand Up @@ -49,6 +49,23 @@ func TestNewBinaryIO(t *testing.T) {
}
}

func TestNewAttachableBinaryIO(t *testing.T) {
ctx := namespaces.WithNamespace(context.Background(), "test")
uri, _ := url.Parse("binary:///bin/echo?test")

before := descriptorCount(t)

_, err := newAttachableBinaryIO(ctx, "1", uri)
if err != nil {
t.Fatal(err)
}

after := descriptorCount(t)
if after != before+9 {
t.Fatalf("descriptors weren't created correctly (%d != %d -1)", before, after)
}
}

func TestNewBinaryIOCleanup(t *testing.T) {
ctx := namespaces.WithNamespace(context.Background(), "test")
uri, _ := url.Parse("binary:///not/existing")
Expand Down

0 comments on commit 2627516

Please sign in to comment.