move contents of pkg/util/test into pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>pull/1737/head
parent
9d9c232729
commit
ffa3251efc
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue