Skip to content

Commit

Permalink
test: Fix mockContainer
Browse files Browse the repository at this point in the history
Latest libcontainer vendoring update introduced a new function as part
of the Container Go interface, OCIState().
The mockContainer interface needs to implement this too, otherwise the
tests won't compile.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
  • Loading branch information
Sebastien Boeuf committed Apr 11, 2019
1 parent 3e12793 commit cb32d28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mockcontainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runtime-spec/specs-go"
)

type mockContainer struct {
Expand All @@ -33,6 +34,10 @@ func (m *mockContainer) State() (*libcontainer.State, error) {
return nil, nil
}

func (m *mockContainer) OCIState() (*specs.State, error) {
return nil, nil
}

func (m *mockContainer) Config() configs.Config {
return configs.Config{
Capabilities: &configs.Capabilities{},
Expand Down

0 comments on commit cb32d28

Please sign in to comment.