mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-19 18:01:01 +00:00
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:
parent
d0bc148fe0
commit
39546a1070
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user