move contents of pkg/util/test into pkg/test

Signed-off-by: Steve Kriss <krisss@vmware.com>
pull/1737/head
Steve Kriss 2019-08-01 09:19:18 -06:00
parent 9d9c232729
commit ffa3251efc
49 changed files with 39 additions and 39 deletions

View File

@ -27,7 +27,7 @@ import (
v1 "github.com/heptio/velero/pkg/apis/velero/v1"
"github.com/heptio/velero/pkg/kuberesource"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestBackupPVAction(t *testing.T) {

View File

@ -48,8 +48,8 @@ import (
"github.com/heptio/velero/pkg/plugin/velero"
"github.com/heptio/velero/pkg/restic"
"github.com/heptio/velero/pkg/test"
testutil "github.com/heptio/velero/pkg/test"
kubeutil "github.com/heptio/velero/pkg/util/kube"
testutil "github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/volume"
)

View File

@ -32,8 +32,8 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/heptio/velero/pkg/apis/velero/v1"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/collections"
velerotest "github.com/heptio/velero/pkg/util/test"
)
type mockItemHookHandler struct {

View File

@ -25,7 +25,7 @@ import (
"github.com/heptio/velero/pkg/kuberesource"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestPodActionAppliesTo(t *testing.T) {

View File

@ -30,7 +30,7 @@ import (
"github.com/heptio/velero/pkg/kuberesource"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func newV1ClusterRoleBindingList(rbacCRBList []rbac.ClusterRoleBinding) []ClusterRoleBinding {

View File

@ -28,7 +28,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
func TestIsValidSignatureVersion(t *testing.T) {

View File

@ -25,7 +25,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
type mockWriteCloser struct {

View File

@ -27,7 +27,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestGetVolumeID(t *testing.T) {

View File

@ -26,7 +26,7 @@ import (
"k8s.io/client-go/kubernetes/fake"
"github.com/heptio/velero/pkg/builder"
testutil "github.com/heptio/velero/pkg/util/test"
testutil "github.com/heptio/velero/pkg/test"
)
func Test_validatePodVolumesHostPath(t *testing.T) {

View File

@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "github.com/heptio/velero/pkg/apis/velero/v1"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestVeleroResourcesExist(t *testing.T) {

View File

@ -42,7 +42,7 @@ import (
persistencemocks "github.com/heptio/velero/pkg/persistence/mocks"
"github.com/heptio/velero/pkg/plugin/clientmgmt"
pluginmocks "github.com/heptio/velero/pkg/plugin/mocks"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/volume"
)

View File

@ -40,7 +40,7 @@ import (
persistencemocks "github.com/heptio/velero/pkg/persistence/mocks"
"github.com/heptio/velero/pkg/plugin/clientmgmt"
pluginmocks "github.com/heptio/velero/pkg/plugin/mocks"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func defaultLocationsList(namespace string) []*velerov1api.BackupStorageLocation {

View File

@ -35,8 +35,8 @@ import (
persistencemocks "github.com/heptio/velero/pkg/persistence/mocks"
"github.com/heptio/velero/pkg/plugin/clientmgmt"
pluginmocks "github.com/heptio/velero/pkg/plugin/mocks"
velerotest "github.com/heptio/velero/pkg/test"
kubeutil "github.com/heptio/velero/pkg/util/kube"
velerotest "github.com/heptio/velero/pkg/util/test"
)
type downloadRequestTestHarness struct {

View File

@ -36,8 +36,8 @@ import (
"github.com/heptio/velero/pkg/builder"
"github.com/heptio/velero/pkg/generated/clientset/versioned/fake"
informers "github.com/heptio/velero/pkg/generated/informers/externalversions"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/kube"
velerotest "github.com/heptio/velero/pkg/util/test"
)
func TestGCControllerEnqueueAllBackups(t *testing.T) {

View File

@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/require"
velerov1api "github.com/heptio/velero/pkg/apis/velero/v1"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestPVBHandler(t *testing.T) {

View File

@ -34,7 +34,7 @@ import (
veleroinformers "github.com/heptio/velero/pkg/generated/informers/externalversions"
velerov1listers "github.com/heptio/velero/pkg/generated/listers/velero/v1"
"github.com/heptio/velero/pkg/restic"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestPVRHandler(t *testing.T) {

View File

@ -46,8 +46,8 @@ import (
pluginmocks "github.com/heptio/velero/pkg/plugin/mocks"
"github.com/heptio/velero/pkg/plugin/velero"
pkgrestore "github.com/heptio/velero/pkg/restore"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/logging"
velerotest "github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/volume"
)

View File

@ -36,7 +36,7 @@ import (
"github.com/heptio/velero/pkg/generated/clientset/versioned/fake"
informers "github.com/heptio/velero/pkg/generated/informers/externalversions"
"github.com/heptio/velero/pkg/metrics"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestProcessSchedule(t *testing.T) {

View File

@ -25,8 +25,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/logging"
velerotest "github.com/heptio/velero/pkg/util/test"
)
func TestSortResources(t *testing.T) {

View File

@ -39,8 +39,8 @@ import (
"github.com/heptio/velero/pkg/cloudprovider"
cloudprovidermocks "github.com/heptio/velero/pkg/cloudprovider/mocks"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/encode"
velerotest "github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/volume"
)

View File

@ -26,7 +26,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/heptio/velero/pkg/plugin/framework"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
func TestNewClientBuilder(t *testing.T) {

View File

@ -27,7 +27,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/heptio/velero/pkg/plugin/framework"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
type mockRegistry struct {

View File

@ -24,7 +24,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
func TestNewRegistry(t *testing.T) {

View File

@ -32,7 +32,7 @@ import (
"github.com/heptio/velero/pkg/backup/mocks"
proto "github.com/heptio/velero/pkg/plugin/generated"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestBackupItemActionGRPCServerExecute(t *testing.T) {

View File

@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
type fakeClient struct {

View File

@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
func TestClientLogger(t *testing.T) {

View File

@ -35,7 +35,7 @@ import (
"k8s.io/client-go/tools/remotecommand"
v1 "github.com/heptio/velero/pkg/apis/velero/v1"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestNewPodCommandExecutor(t *testing.T) {

View File

@ -30,7 +30,7 @@ import (
velerov1api "github.com/heptio/velero/pkg/apis/velero/v1"
"github.com/heptio/velero/pkg/generated/clientset/versioned/fake"
informers "github.com/heptio/velero/pkg/generated/informers/externalversions"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestGetPodSnapshotAnnotations(t *testing.T) {

View File

@ -27,7 +27,7 @@ import (
"github.com/heptio/velero/pkg/kuberesource"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestAddPVFromPVCActionExecute(t *testing.T) {

View File

@ -28,7 +28,7 @@ import (
"github.com/heptio/velero/pkg/kuberesource"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestAddPVCFromPodActionExecute(t *testing.T) {

View File

@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestJobActionExecute(t *testing.T) {

View File

@ -25,7 +25,7 @@ import (
corev1api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
var mergedServiceAccountsBenchmarkResult *unstructured.Unstructured

View File

@ -27,7 +27,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestPodActionExecute(t *testing.T) {

View File

@ -31,7 +31,7 @@ import (
"github.com/heptio/velero/pkg/generated/clientset/versioned/fake"
informers "github.com/heptio/velero/pkg/generated/informers/externalversions"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/volume"
)

View File

@ -33,8 +33,8 @@ import (
"github.com/heptio/velero/pkg/buildinfo"
velerofake "github.com/heptio/velero/pkg/generated/clientset/versioned/fake"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/kube"
velerotest "github.com/heptio/velero/pkg/util/test"
)
func TestGetImage(t *testing.T) {

View File

@ -51,10 +51,10 @@ import (
"github.com/heptio/velero/pkg/kuberesource"
"github.com/heptio/velero/pkg/plugin/velero"
"github.com/heptio/velero/pkg/test"
testutil "github.com/heptio/velero/pkg/test"
"github.com/heptio/velero/pkg/util/collections"
"github.com/heptio/velero/pkg/util/encode"
kubeutil "github.com/heptio/velero/pkg/util/kube"
testutil "github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/volume"
)

View File

@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/heptio/velero/pkg/plugin/velero"
"github.com/heptio/velero/pkg/util/test"
"github.com/heptio/velero/pkg/test"
)
func TestServiceAccountActionAppliesTo(t *testing.T) {

View File

@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/heptio/velero/pkg/plugin/velero"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func svcJSON(ports ...corev1api.ServicePort) string {

View File

@ -31,7 +31,7 @@ import (
"github.com/heptio/velero/pkg/builder"
"github.com/heptio/velero/pkg/test"
velerotest "github.com/heptio/velero/pkg/util/test"
velerotest "github.com/heptio/velero/pkg/test"
)
func TestNamespaceAndName(t *testing.T) {