Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #901 from clearcontainers/revendor_virtcontainers
Browse files Browse the repository at this point in the history
vendor: Update virtcontainers vendoring
  • Loading branch information
Samuel Ortiz authored Jan 8, 2018
2 parents be7d1ce + cec1b6f commit 9014fe3
Show file tree
Hide file tree
Showing 790 changed files with 309,428 additions and 8,049 deletions.
55 changes: 49 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
name = "github.com/opencontainers/runc"
revision = "a0159fddcd197a57790b6dd5654802b7dc8f80be"

[[constraint]]
name = "github.com/opencontainers/runtime-spec"
revision = "a8125598b32a65ff55c83214d3c262383178e7fa"

[[constraint]]
name = "github.com/pmezard/go-difflib"
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
Expand Down Expand Up @@ -74,10 +70,6 @@
name = "golang.org/x/crypto"
revision = "76eec36fa14229c4b25bb894c2d0e591527af429"

[[constraint]]
name = "golang.org/x/sys"
revision = "314a259e304ff91bd6985da2a7149bbf91237993"

[[constraint]]
name = "github.com/containers/virtcontainers"
revision = "d2342c73a2b486736b2f88164b13b542873115dc"
revision = "387abeb4466d86aef1171b054f64ee8c636aa05f"
2 changes: 1 addition & 1 deletion cc-env.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func getCommandVersion(cmd string) (string, error) {
}

func getShimInfo(config oci.RuntimeConfig) (ShimInfo, error) {
shimConfig, ok := config.ShimConfig.(vc.CCShimConfig)
shimConfig, ok := config.ShimConfig.(vc.ShimConfig)
if !ok {
return ShimInfo{}, errors.New("cannot determine shim config")
}
Expand Down
2 changes: 1 addition & 1 deletion cc-env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func getExpectedProxyDetails(config oci.RuntimeConfig) (ProxyInfo, error) {
}

func getExpectedShimDetails(config oci.RuntimeConfig) (ShimInfo, error) {
shimConfig, ok := config.ShimConfig.(vc.CCShimConfig)
shimConfig, ok := config.ShimConfig.(vc.ShimConfig)
if !ok {
return ShimInfo{}, fmt.Errorf("failed to get shim config")
}
Expand Down
8 changes: 4 additions & 4 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ func newHyperstartAgentConfig(a agent) (vc.HyperConfig, error) {
return vc.HyperConfig{}, nil
}

func newCCShimConfig(s shim) (vc.CCShimConfig, error) {
func newShimConfig(s shim) (vc.ShimConfig, error) {
path, err := s.path()
if err != nil {
return vc.CCShimConfig{}, err
return vc.ShimConfig{}, err
}

return vc.CCShimConfig{
return vc.ShimConfig{
Path: path,
Debug: s.debug(),
}, nil
Expand Down Expand Up @@ -353,7 +353,7 @@ func updateRuntimeConfig(configPath string, tomlConf tomlConfig, config *oci.Run
for k, shim := range tomlConf.Shim {
switch k {
case ccShimTableType:
shConfig, err := newCCShimConfig(shim)
shConfig, err := newShimConfig(shim)
if err != nil {
return fmt.Errorf("%v: %v", configPath, err)
}
Expand Down
10 changes: 5 additions & 5 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
Path: proxyPath,
}

shimConfig := vc.CCShimConfig{
shimConfig := vc.ShimConfig{
Path: shimPath,
}

Expand Down Expand Up @@ -362,7 +362,7 @@ func TestConfigLoadConfigurationFailMissingShim(t *testing.T) {
func(config testRuntimeConfig, configFile string, ignoreLogging bool) (bool, error) {
expectFail := true

shimConfig, ok := config.RuntimeConfig.ShimConfig.(vc.CCShimConfig)
shimConfig, ok := config.RuntimeConfig.ShimConfig.(vc.ShimConfig)
if !ok {
return expectFail, fmt.Errorf("cannot determine shim config")
}
Expand Down Expand Up @@ -517,7 +517,7 @@ func TestMinimalRuntimeConfig(t *testing.T) {
Path: proxyPath,
}

expectedShimConfig := vc.CCShimConfig{
expectedShimConfig := vc.ShimConfig{
Path: shimPath,
}

Expand Down Expand Up @@ -628,7 +628,7 @@ func TestNewCCShimConfig(t *testing.T) {
Path: shimPath,
}

_, err = newCCShimConfig(shim)
_, err = newShimConfig(shim)
if err == nil {
t.Fatalf("Expected newCCShimConfig to fail as no paths exist")
}
Expand All @@ -638,7 +638,7 @@ func TestNewCCShimConfig(t *testing.T) {
t.Error(err)
}

shConfig, err := newCCShimConfig(shim)
shConfig, err := newShimConfig(shim)
if err != nil {
t.Fatalf("newCCShimConfig failed unexpectedly: %v", err)
}
Expand Down
28 changes: 14 additions & 14 deletions delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

vc "github.com/containers/virtcontainers"
"github.com/containers/virtcontainers/pkg/oci"
vcAnnotations "github.com/containers/virtcontainers/pkg/annotations"
"github.com/containers/virtcontainers/pkg/vcMock"
"github.com/stretchr/testify/assert"
"github.com/urfave/cli"
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestDeleteInvalidConfig(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
},
},
},
Expand Down Expand Up @@ -181,8 +181,8 @@ func TestDeletePod(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "ready",
Expand Down Expand Up @@ -244,8 +244,8 @@ func TestDeleteInvalidContainerType(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: "InvalidType",
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: "InvalidType",
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "created",
Expand Down Expand Up @@ -285,8 +285,8 @@ func TestDeletePodRunning(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "running",
Expand Down Expand Up @@ -357,8 +357,8 @@ func TestDeleteRunningContainer(t *testing.T) {
{
ID: pod.MockContainers[0].ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodContainer),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodContainer),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "running",
Expand Down Expand Up @@ -433,8 +433,8 @@ func TestDeleteContainer(t *testing.T) {
{
ID: pod.MockContainers[0].ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodContainer),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodContainer),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "ready",
Expand Down Expand Up @@ -528,8 +528,8 @@ func TestDeleteCLIFunctionSuccess(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "ready",
Expand Down
Loading

0 comments on commit 9014fe3

Please sign in to comment.