runtime: delete not used functions

Delete some not used functions in sandbox.go

Fixes: #2230

Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
bin 2021-07-14 19:33:21 +08:00
parent d0bc148fe0
commit 39546a1070
2 changed files with 1 additions and 27 deletions

View File

@ -1555,18 +1555,7 @@ func (s *Sandbox) Stop(ctx context.Context, force bool) error {
return nil
}
// list lists all sandbox running on the host.
func (s *Sandbox) list() ([]Sandbox, error) {
return nil, nil
}
// enter runs an executable within a sandbox.
func (s *Sandbox) enter(args []string) error {
return nil
}
// setSandboxState sets both the in-memory and on-disk state of the
// sandbox.
// setSandboxState sets the in-memory state of the sandbox.
func (s *Sandbox) setSandboxState(state types.StateString) error {
if state == "" {
return vcTypes.ErrNeedState

View File

@ -181,21 +181,6 @@ func TestCreateSandboxEmptyID(t *testing.T) {
defer cleanUp()
}
func TestSandboxListSuccessful(t *testing.T) {
sandbox := &Sandbox{}
sandboxList, err := sandbox.list()
assert.NoError(t, err)
assert.Nil(t, sandboxList)
}
func TestSandboxEnterSuccessful(t *testing.T) {
sandbox := &Sandbox{}
err := sandbox.enter([]string{})
assert.NoError(t, err)
}
func testCheckInitSandboxAndContainerStates(p *Sandbox, initialSandboxState types.SandboxState, c *Container, initialContainerState types.ContainerState) error {
if p.state.State != initialSandboxState.State {
return fmt.Errorf("Expected sandbox state %v, got %v", initialSandboxState.State, p.state.State)