github.com/kata-containers/runtime@v0.0.0-20210505125100-04f29832a923/virtcontainers/noop_shim_test.go (about)

     1  // Copyright (c) 2017 Intel Corporation
     2  //
     3  // SPDX-License-Identifier: Apache-2.0
     4  //
     5  
     6  package virtcontainers
     7  
     8  import (
     9  	"testing"
    10  
    11  	"github.com/stretchr/testify/assert"
    12  )
    13  
    14  func TestNoopShimStart(t *testing.T) {
    15  	assert := assert.New(t)
    16  	s := &noopShim{}
    17  	sandbox := &Sandbox{}
    18  	params := ShimParams{}
    19  	expected := 0
    20  
    21  	pid, err := s.start(sandbox, params)
    22  	assert.NoError(err)
    23  	assert.Equal(pid, expected)
    24  }