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

Commit

Permalink
virtcontainers: Change all import paths
Browse files Browse the repository at this point in the history
Some virtcontainers pieces of code are importing virtcontainers
packages. We need to change those paths to point at
kata-containers/runtime/virtcontainers

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Samuel Ortiz committed Feb 23, 2018
1 parent 5b0a080 commit 8c11930
Show file tree
Hide file tree
Showing 30 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions virtcontainers/.ci/go-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
set -e

test_packages=$(go list ./... | grep -v vendor)
test_ldflags="-X github.com/containers/virtcontainers/pkg/mock.DefaultMockCCShimBinPath=$1 \
-X github.com/containers/virtcontainers/pkg/mock.DefaultMockKataShimBinPath=$2 \
-X github.com/containers/virtcontainers/pkg/mock.DefaultMockHookBinPath=$3"
test_ldflags="-X github.com/kata-containers/runtime/virtcontainers/pkg/mock.DefaultMockCCShimBinPath=$1 \
-X github.com/kata-containers/runtime/virtcontainers/pkg/mock.DefaultMockKataShimBinPath=$2 \
-X github.com/kata-containers/runtime/virtcontainers/pkg/mock.DefaultMockHookBinPath=$3"
echo "Run go test and generate coverage:"
for pkg in $test_packages; do
if [ "$pkg" = "github.com/containers/virtcontainers" ]; then
if [ "$pkg" = "github.com/kata-containers/runtime/virtcontainers" ]; then
sudo env GOPATH=$GOPATH GOROOT=$GOROOT PATH=$PATH go test -ldflags "$test_ldflags" -cover -coverprofile=profile.cov $pkg
else
sudo env GOPATH=$GOPATH GOROOT=$GOROOT PATH=$PATH go test -ldflags "$test_ldflags" -cover $pkg
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/.ci/update-vendoring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -e

proxy_repo="github.com/clearcontainers/proxy"
runtime_repo="github.com/clearcontainers/runtime"
virtcontainers_repo="github.com/containers/virtcontainers"
virtcontainers_repo="github.com/kata-containers/runtime/virtcontainers"

function apply_depends_on(){
pushd "${GOPATH}/src/${virtcontainers_repo}"
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"syscall"
"testing"

"github.com/containers/virtcontainers/pkg/mock"
"github.com/kata-containers/runtime/virtcontainers/pkg/mock"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"io/ioutil"
"path/filepath"

"github.com/containers/virtcontainers/pkg/annotations"
"github.com/kata-containers/runtime/virtcontainers/pkg/annotations"
)

type assetType string
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"testing"

"github.com/containers/virtcontainers/pkg/annotations"
"github.com/kata-containers/runtime/virtcontainers/pkg/annotations"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/cc_shim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"time"
"unsafe"

. "github.com/containers/virtcontainers/pkg/mock"
. "github.com/kata-containers/runtime/virtcontainers/pkg/mock"
)

// These tests don't care about the format of the container ID
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
cniTypes "github.com/containernetworking/cni/pkg/types"
cniV2Types "github.com/containernetworking/cni/pkg/types/020"
cniLatestTypes "github.com/containernetworking/cni/pkg/types/current"
cniPlugin "github.com/containers/virtcontainers/pkg/cni"
cniPlugin "github.com/kata-containers/runtime/virtcontainers/pkg/cni"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/example_pod_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
)

const containerRootfs = "/var/lib/container/bundle/"
Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/hack/virtc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"strings"
"text/tabwriter"

"github.com/containers/virtcontainers/pkg/uuid"
"github.com/kata-containers/runtime/virtcontainers/pkg/uuid"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"

vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
)

var virtcLog = logrus.New()
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"reflect"
"testing"

. "github.com/containers/virtcontainers/pkg/mock"
. "github.com/kata-containers/runtime/virtcontainers/pkg/mock"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/hyperstart_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"

proxyClient "github.com/clearcontainers/proxy/client"
"github.com/containers/virtcontainers/pkg/hyperstart"
"github.com/kata-containers/runtime/virtcontainers/pkg/hyperstart"
"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
)
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/hyperstart_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"reflect"
"testing"

"github.com/containers/virtcontainers/pkg/hyperstart"
"github.com/kata-containers/runtime/virtcontainers/pkg/hyperstart"
"github.com/vishvananda/netlink"
)

Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"strings"
"syscall"

vcAnnotations "github.com/containers/virtcontainers/pkg/annotations"
"github.com/containers/virtcontainers/pkg/uuid"
vcAnnotations "github.com/kata-containers/runtime/virtcontainers/pkg/annotations"
"github.com/kata-containers/runtime/virtcontainers/pkg/uuid"
kataclient "github.com/kata-containers/agent/protocols/client"
"github.com/kata-containers/agent/protocols/grpc"
"github.com/opencontainers/runtime-spec/specs-go"
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/kata_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"testing"

"github.com/containers/virtcontainers/pkg/mock"
"github.com/kata-containers/runtime/virtcontainers/pkg/mock"
gpb "github.com/gogo/protobuf/types"
pb "github.com/kata-containers/agent/protocols/grpc"
"golang.org/x/net/context"
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/kata_shim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"testing"
"time"

. "github.com/containers/virtcontainers/pkg/mock"
. "github.com/kata-containers/runtime/virtcontainers/pkg/mock"
)

// These tests don't care about the format of the container ID
Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
"time"

"github.com/containernetworking/plugins/pkg/ns"
"github.com/containers/virtcontainers/pkg/ethtool"
"github.com/containers/virtcontainers/pkg/uuid"
"github.com/kata-containers/runtime/virtcontainers/pkg/ethtool"
"github.com/kata-containers/runtime/virtcontainers/pkg/uuid"
"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
"github.com/vishvananda/netns"
Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/pkg/hyperstart/hyperstart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"testing"
"time"

. "github.com/containers/virtcontainers/pkg/hyperstart"
"github.com/containers/virtcontainers/pkg/hyperstart/mock"
. "github.com/kata-containers/runtime/virtcontainers/pkg/hyperstart"
"github.com/kata-containers/runtime/virtcontainers/pkg/hyperstart/mock"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pkg/hyperstart/mock/hyperstart.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sync"
"testing"

hyper "github.com/containers/virtcontainers/pkg/hyperstart"
hyper "github.com/kata-containers/runtime/virtcontainers/pkg/hyperstart"
"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions virtcontainers/pkg/oci/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"strings"

criContainerdAnnotations "github.com/containerd/cri-containerd/pkg/annotations"
vc "github.com/containers/virtcontainers"
vcAnnotations "github.com/containers/virtcontainers/pkg/annotations"
dockershimAnnotations "github.com/containers/virtcontainers/pkg/annotations/dockershim"
vc "github.com/kata-containers/runtime/virtcontainers"
vcAnnotations "github.com/kata-containers/runtime/virtcontainers/pkg/annotations"
dockershimAnnotations "github.com/kata-containers/runtime/virtcontainers/pkg/annotations/dockershim"
crioAnnotations "github.com/kubernetes-incubator/cri-o/pkg/annotations"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus"
Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/pkg/oci/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"reflect"
"testing"

vc "github.com/containers/virtcontainers"
vcAnnotations "github.com/containers/virtcontainers/pkg/annotations"
vc "github.com/kata-containers/runtime/virtcontainers"
vcAnnotations "github.com/kata-containers/runtime/virtcontainers/pkg/annotations"
"github.com/kubernetes-incubator/cri-o/pkg/annotations"
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pkg/vcMock/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package vcMock

import (
vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
)

// ID implements the VCContainer function of the same name.
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pkg/vcMock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"fmt"
"syscall"

vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pkg/vcMock/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"syscall"
"testing"

vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pkg/vcMock/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package vcMock

import (
vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
)

// ID implements the VCPod function of the same name.
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pkg/vcMock/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package vcMock
import (
"syscall"

vc "github.com/containers/virtcontainers"
vc "github.com/kata-containers/runtime/virtcontainers"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"sync"
"testing"

"github.com/containers/virtcontainers/pkg/annotations"
"github.com/kata-containers/runtime/virtcontainers/pkg/annotations"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"time"

"github.com/containers/virtcontainers/pkg/uuid"
"github.com/kata-containers/runtime/virtcontainers/pkg/uuid"
govmmQemu "github.com/intel/govmm/qemu"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/shim/mock/cc-shim/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package main

import (
"github.com/containers/virtcontainers/pkg/mock"
"github.com/kata-containers/runtime/virtcontainers/pkg/mock"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/shim/mock/kata-shim/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package main

import (
"github.com/containers/virtcontainers/pkg/mock"
"github.com/kata-containers/runtime/virtcontainers/pkg/mock"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/utils/virtcontainers-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ echo "Clone cni"
git clone https://github.com/containernetworking/plugins.git

echo "Copy CNI config files"
cp $GOPATH/src/github.com/containers/virtcontainers/test/cni/10-mynet.conf ${ETCDIR}/cni/net.d/
cp $GOPATH/src/github.com/containers/virtcontainers/test/cni/99-loopback.conf ${ETCDIR}/cni/net.d/
cp $GOPATH/src/github.com/kata-containers/runtime/virtcontainers/test/cni/10-mynet.conf ${ETCDIR}/cni/net.d/
cp $GOPATH/src/github.com/kata-containers/runtime/virtcontainers/test/cni/99-loopback.conf ${ETCDIR}/cni/net.d/

pushd plugins
./build.sh
Expand Down

0 comments on commit 8c11930

Please sign in to comment.