mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 11:45:20 +00:00
chore: define common aliases for k8s packages (#8672)
Some checks failed
Run the E2E test on kind / build (push) Failing after 6m48s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 35s
Close stale issues and PRs / stale (push) Successful in 8s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m11s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 47s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 49s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 43s
Some checks failed
Run the E2E test on kind / build (push) Failing after 6m48s
Run the E2E test on kind / setup-test-matrix (push) Successful in 3s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 35s
Close stale issues and PRs / stale (push) Successful in 8s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m11s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 47s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 49s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 43s
* lchore: define common alias for k8s packages Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> * Update .golangci.yaml Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> * Update .golangci.yaml Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> * Update .golangci.yaml Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> --------- Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/builder"
|
||||
velerotest "github.com/vmware-tanzu/velero/pkg/test"
|
||||
@@ -32,8 +32,8 @@ func TestNamespacedFileStore(t *testing.T) {
|
||||
name string
|
||||
namespace string
|
||||
fsRoot string
|
||||
secrets []*corev1.Secret
|
||||
secretSelector *corev1.SecretKeySelector
|
||||
secrets []*corev1api.Secret
|
||||
secretSelector *corev1api.SecretKeySelector
|
||||
wantErr string
|
||||
expectedPath string
|
||||
expectedContents string
|
||||
@@ -48,7 +48,7 @@ func TestNamespacedFileStore(t *testing.T) {
|
||||
namespace: "ns1",
|
||||
fsRoot: "/tmp/credentials",
|
||||
secretSelector: builder.ForSecretKeySelector("credential", "key2").Result(),
|
||||
secrets: []*corev1.Secret{
|
||||
secrets: []*corev1api.Secret{
|
||||
builder.ForSecret("ns1", "credential").Data(map[string][]byte{
|
||||
"key1": []byte("ns1-secretdata1"),
|
||||
"key2": []byte("ns1-secretdata2"),
|
||||
|
||||
@@ -4,7 +4,7 @@ package mocks
|
||||
|
||||
import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// FileStore is an autogenerated mock type for the FileStore type
|
||||
@@ -13,18 +13,18 @@ type FileStore struct {
|
||||
}
|
||||
|
||||
// Path provides a mock function with given fields: selector
|
||||
func (_m *FileStore) Path(selector *v1.SecretKeySelector) (string, error) {
|
||||
func (_m *FileStore) Path(selector *corev1api.SecretKeySelector) (string, error) {
|
||||
ret := _m.Called(selector)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(*v1.SecretKeySelector) string); ok {
|
||||
if rf, ok := ret.Get(0).(func(*corev1api.SecretKeySelector) string); ok {
|
||||
r0 = rf(selector)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*v1.SecretKeySelector) error); ok {
|
||||
if rf, ok := ret.Get(1).(func(*corev1api.SecretKeySelector) error); ok {
|
||||
r1 = rf(selector)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
|
||||
@@ -4,7 +4,7 @@ package mocks
|
||||
|
||||
import (
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// SecretStore is an autogenerated mock type for the SecretStore type
|
||||
@@ -13,18 +13,18 @@ type SecretStore struct {
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: selector
|
||||
func (_m *SecretStore) Get(selector *v1.SecretKeySelector) (string, error) {
|
||||
func (_m *SecretStore) Get(selector *corev1api.SecretKeySelector) (string, error) {
|
||||
ret := _m.Called(selector)
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func(*v1.SecretKeySelector) string); ok {
|
||||
if rf, ok := ret.Get(0).(func(*corev1api.SecretKeySelector) string); ok {
|
||||
r0 = rf(selector)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*v1.SecretKeySelector) error); ok {
|
||||
if rf, ok := ret.Get(1).(func(*corev1api.SecretKeySelector) error); ok {
|
||||
r1 = rf(selector)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
|
||||
Reference in New Issue
Block a user