From e58bf460137a0788c156c9630d85ec31d2aa4411 Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 10:40:52 +0200 Subject: [PATCH 01/19] #31 update dependencies and mocks --- go.mod | 89 +++-- go.sum | 138 +++++++ pkg/additionalimages/mock_Getter_test.go | 15 +- pkg/additionalimages/mock_Updater_test.go | 15 +- .../mock_backupScheduleClient_test.go | 79 +++- .../mock_batchV1Interface_test.go | 23 +- .../mock_cronJobInterface_test.go | 55 ++- .../mock_ecosystemClientSet_test.go | 375 ++++++++++++++++-- .../mock_ecosystemV1Alpha1Interface_test.go | 23 +- .../mock_eventRecorder_test.go | 11 +- .../ecosystem/mock_BackupInterface_test.go | 75 +++- .../mock_BackupScheduleInterface_test.go | 79 +++- .../mock_BackupSchedulesGetter_test.go | 15 +- pkg/api/ecosystem/mock_BackupsGetter_test.go | 15 +- pkg/api/ecosystem/mock_Interface_test.go | 375 ++++++++++++++++-- .../ecosystem/mock_RestoreInterface_test.go | 75 +++- pkg/api/ecosystem/mock_RestoresGetter_test.go | 15 +- .../ecosystem/mock_V1Alpha1Interface_test.go | 23 +- pkg/api/ecosystem/mock_restInterface_test.go | 43 +- pkg/api/v1/mock_RequeuableObject_test.go | 27 +- pkg/api/v1/mock_RequeueableStatus_test.go | 19 +- pkg/backup/mock_MaintenanceModeSwitch_test.go | 19 +- .../mock_backupControllerManager_test.go | 23 +- pkg/backup/mock_backupProvider_test.go | 39 +- .../mock_backupV1Alpha1Interface_test.go | 23 +- pkg/backup/mock_configurationContext_test.go | 51 ++- pkg/backup/mock_controllerManager_test.go | 126 +++++- pkg/backup/mock_createManager_test.go | 15 +- pkg/backup/mock_deleteManager_test.go | 15 +- .../mock_ecosystemBackupInterface_test.go | 75 +++- pkg/backup/mock_ecosystemInterface_test.go | 375 ++++++++++++++++-- pkg/backup/mock_etcdRegistry_test.go | 43 +- pkg/backup/mock_eventRecorder_test.go | 11 +- pkg/backup/mock_requeueHandler_test.go | 15 +- pkg/backup/mock_statusSyncManager_test.go | 15 +- pkg/backupschedule/mock_Manager_test.go | 23 +- .../mock_batchV1Interface_test.go | 23 +- .../mock_controllerManager_test.go | 126 +++++- pkg/backupschedule/mock_createManager_test.go | 15 +- .../mock_cronJobInterface_test.go | 55 ++- pkg/backupschedule/mock_deleteManager_test.go | 15 +- ...k_ecosystemBackupScheduleInterface_test.go | 79 +++- .../mock_ecosystemInterface_test.go | 375 ++++++++++++++++-- .../mock_ecosystemV1Alpha1Interface_test.go | 23 +- pkg/backupschedule/mock_eventRecorder_test.go | 11 +- .../mock_requeueHandler_test.go | 15 +- pkg/backupschedule/mock_updateManager_test.go | 15 +- pkg/cleanup/mock_Manager_test.go | 15 +- pkg/cleanup/mock_discoveryInterface_test.go | 51 ++- pkg/cleanup/mock_k8sClient_test.go | 63 ++- pkg/garbagecollection/mock_Manager_test.go | 15 +- .../mock_backupClient_test.go | 75 +++- .../mock_ecosystemClientSet_test.go | 375 ++++++++++++++++-- .../mock_ecosystemV1Alpha1_test.go | 23 +- .../mock_strategyGetter_test.go | 15 +- pkg/garbagecollection/mock_strategy_test.go | 19 +- pkg/maintenance/mock_globalConfig_test.go | 51 ++- .../mock_maintenanceModeSwitch_test.go | 19 +- pkg/maintenance/mock_serviceInterface_test.go | 55 ++- .../mock_statefulSetInterface_test.go | 67 +++- pkg/maintenance/mock_watcher_test.go | 15 +- pkg/provider/mock_EcosystemClientSet_test.go | 375 ++++++++++++++++-- pkg/provider/mock_EventRecorder_test.go | 11 +- pkg/provider/mock_Provider_test.go | 39 +- .../mock_RestoreV1Alpha1Interface_test.go | 23 +- .../mock_backupV1Alpha1Interface_test.go | 23 +- .../mock_ecosystemBackupInterface_test.go | 75 +++- pkg/requeue/mock_ecosystemInterface_test.go | 375 ++++++++++++++++-- .../mock_ecosystemRestoreInterface_test.go | 75 +++- pkg/requeue/mock_eventRecorder_test.go | 11 +- pkg/requeue/mock_requeuableError_test.go | 19 +- pkg/restore/mock_appsV1Interface_test.go | 35 +- pkg/restore/mock_cesRegistry_test.go | 43 +- pkg/restore/mock_cleanupManager_test.go | 15 +- pkg/restore/mock_configurationContext_test.go | 51 ++- pkg/restore/mock_controllerManager_test.go | 126 +++++- pkg/restore/mock_coreV1Interface_test.go | 79 +++- pkg/restore/mock_createManager_test.go | 15 +- pkg/restore/mock_deleteManager_test.go | 15 +- pkg/restore/mock_ecosystemInterface_test.go | 375 ++++++++++++++++-- .../mock_ecosystemRestoreInterface_test.go | 75 +++- .../mock_ecosystemV1Alpha1Interface_test.go | 23 +- pkg/restore/mock_eventRecorder_test.go | 11 +- .../mock_maintenanceModeSwitch_test.go | 19 +- pkg/restore/mock_requeueHandler_test.go | 15 +- pkg/restore/mock_restoreManager_test.go | 19 +- pkg/restore/mock_restoreProvider_test.go | 39 +- pkg/restore/mock_serviceInterface_test.go | 55 ++- pkg/restore/mock_statefulSetInterface_test.go | 67 +++- pkg/retention/mock_Strategy_test.go | 19 +- pkg/retention/mock_timeProvider_test.go | 15 +- pkg/scheduledbackup/mock_Manager_test.go | 15 +- .../mock_ecosystemBackupInterface_test.go | 75 +++- .../mock_ecosystemClientSet_test.go | 375 ++++++++++++++++-- .../mock_ecosystemV1Alpha1Interface_test.go | 23 +- pkg/scheduledbackup/mock_timeProvider_test.go | 15 +- pkg/time/mock_TimeProvider_test.go | 15 +- pkg/velero/mock_backupManager_test.go | 19 +- .../mock_ecosystemBackupInterface_test.go | 75 +++- pkg/velero/mock_ecosystemClientSet_test.go | 375 ++++++++++++++++-- .../mock_ecosystemV1Alpha1Interface_test.go | 23 +- pkg/velero/mock_ecosystemWatch_test.go | 15 +- pkg/velero/mock_eventRecorder_test.go | 11 +- pkg/velero/mock_manager_test.go | 35 +- pkg/velero/mock_restoreManager_test.go | 19 +- pkg/velero/mock_syncManager_test.go | 19 +- pkg/velero/mock_veleroBackupInterface_test.go | 47 ++- ...leroBackupStorageLocationInterface_test.go | 47 ++- pkg/velero/mock_veleroClientSet_test.go | 23 +- .../mock_veleroDeleteBackupRequest_test.go | 47 ++- pkg/velero/mock_veleroInterface_test.go | 59 ++- .../mock_veleroRestoreInterface_test.go | 47 ++- 112 files changed, 6606 insertions(+), 972 deletions(-) diff --git a/go.mod b/go.mod index 5ed8355..f5e68d3 100644 --- a/go.mod +++ b/go.mod @@ -1,44 +1,47 @@ module github.com/cloudogu/k8s-backup-operator -go 1.21 +go 1.23 + +toolchain go1.23.1 require ( - github.com/Masterminds/semver/v3 v3.2.1 - github.com/cloudogu/cesapp-lib v0.12.2 - github.com/dlclark/regexp2 v1.10.0 - github.com/go-logr/logr v1.3.0 + github.com/Masterminds/semver/v3 v3.3.0 + github.com/cloudogu/cesapp-lib v0.14.0 + github.com/dlclark/regexp2 v1.11.4 + github.com/go-logr/logr v1.4.2 github.com/google/gnostic-models v0.6.8 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.29.0 - github.com/stretchr/testify v1.8.4 + github.com/onsi/gomega v1.34.2 + github.com/stretchr/testify v1.9.0 github.com/vmware-tanzu/velero v1.12.1 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b - sigs.k8s.io/controller-runtime v0.16.3 + k8s.io/api v0.31.1 + k8s.io/apimachinery v0.31.1 + k8s.io/client-go v0.31.1 + k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 + sigs.k8s.io/controller-runtime v0.19.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/eapache/go-resiliency v1.4.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.7.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/zapr v1.2.4 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -49,38 +52,40 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/objx v0.5.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/v2 v2.305.9 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.etcd.io/etcd/api/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/v2 v2.305.13 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.25.0 // indirect + go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.3 // indirect - k8s.io/component-base v0.28.3 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/component-base v0.31.0 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 1de3a11..cb9f17c 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -7,16 +9,24 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudogu/cesapp-lib v0.12.2 h1:++yK7s69DMCtpIt1nQ2x05cGAe6UH4KnsgEscV7wdq0= github.com/cloudogu/cesapp-lib v0.12.2/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= +github.com/cloudogu/cesapp-lib v0.14.0 h1:955cU7ivgiSJGPJ36/YHhbrT0d7Km+7BwOITPrAJijo= +github.com/cloudogu/cesapp-lib v0.14.0/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo= +github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= @@ -25,16 +35,28 @@ github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCv github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= @@ -43,9 +65,12 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -61,6 +86,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -75,8 +102,12 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= @@ -114,25 +145,46 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= +github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA= +github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -141,6 +193,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -149,28 +203,49 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/vmware-tanzu/velero v1.12.1 h1:WKmSmyE5haJpQMuw+RzA3bNTGHZP80jnDEJutsthmF8= github.com/vmware-tanzu/velero v1.12.1/go.mod h1:/DciEpV9LMokDQoZAp+bH4CQInmFyw3cU2CKiqrHghs= +github.com/vmware-tanzu/velero v1.14.1 h1:HYj73scn7ZqtfTanjW/X4W0Hn3w/qcfoRbrHCWM52iI= +github.com/vmware-tanzu/velero v1.14.1/go.mod h1:/OzHzTvbevkkX+bK/BS4AgYMv6nKuOgsybuuvLWkSS0= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= +go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= +go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= +go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= +go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -194,8 +269,14 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= +golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -222,18 +303,26 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -244,6 +333,8 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -262,10 +353,16 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -283,25 +380,66 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= +k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= +k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= +k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= +k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= +k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= +sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= +sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/pkg/additionalimages/mock_Getter_test.go b/pkg/additionalimages/mock_Getter_test.go index 0f36ca4..c08e4fe 100644 --- a/pkg/additionalimages/mock_Getter_test.go +++ b/pkg/additionalimages/mock_Getter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -25,6 +25,10 @@ func (_m *MockGetter) EXPECT() *MockGetter_Expecter { func (_m *MockGetter) ImageForKey(ctx context.Context, key string) (string, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for ImageForKey") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { @@ -74,13 +78,12 @@ func (_c *MockGetter_ImageForKey_Call) RunAndReturn(run func(context.Context, st return _c } -type mockConstructorTestingTNewMockGetter interface { +// NewMockGetter creates a new instance of MockGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockGetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockGetter creates a new instance of MockGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockGetter(t mockConstructorTestingTNewMockGetter) *MockGetter { +}) *MockGetter { mock := &MockGetter{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_Updater_test.go b/pkg/additionalimages/mock_Updater_test.go index 495f791..1c4ea6f 100644 --- a/pkg/additionalimages/mock_Updater_test.go +++ b/pkg/additionalimages/mock_Updater_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -25,6 +25,10 @@ func (_m *MockUpdater) EXPECT() *MockUpdater_Expecter { func (_m *MockUpdater) Update(ctx context.Context, config ImageConfig) error { ret := _m.Called(ctx, config) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, ImageConfig) error); ok { r0 = rf(ctx, config) @@ -64,13 +68,12 @@ func (_c *MockUpdater_Update_Call) RunAndReturn(run func(context.Context, ImageC return _c } -type mockConstructorTestingTNewMockUpdater interface { +// NewMockUpdater creates a new instance of MockUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockUpdater(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockUpdater creates a new instance of MockUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockUpdater(t mockConstructorTestingTNewMockUpdater) *MockUpdater { +}) *MockUpdater { mock := &MockUpdater{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_backupScheduleClient_test.go b/pkg/additionalimages/mock_backupScheduleClient_test.go index 7ff2952..67ea80f 100644 --- a/pkg/additionalimages/mock_backupScheduleClient_test.go +++ b/pkg/additionalimages/mock_backupScheduleClient_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -32,6 +32,10 @@ func (_m *mockBackupScheduleClient) EXPECT() *mockBackupScheduleClient_Expecter func (_m *mockBackupScheduleClient) AddFinalizer(ctx context.Context, backupSchedule *v1.BackupSchedule, finalizer string) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, string) (*v1.BackupSchedule, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockBackupScheduleClient_AddFinalizer_Call) RunAndReturn(run func(cont func (_m *mockBackupScheduleClient) AddLabels(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockBackupScheduleClient_AddLabels_Call) RunAndReturn(run func(context func (_m *mockBackupScheduleClient) Create(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.CreateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.CreateOptions) (*v1.BackupSchedule, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockBackupScheduleClient_Create_Call) RunAndReturn(run func(context.Co func (_m *mockBackupScheduleClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockBackupScheduleClient_Delete_Call) RunAndReturn(run func(context.Co func (_m *mockBackupScheduleClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockBackupScheduleClient_DeleteCollection_Call) RunAndReturn(run func( func (_m *mockBackupScheduleClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.BackupSchedule, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockBackupScheduleClient_Get_Call) RunAndReturn(run func(context.Conte func (_m *mockBackupScheduleClient) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupScheduleList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupScheduleList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupScheduleList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockBackupScheduleClient) Patch(ctx context.Context, name string, pt t _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.BackupSchedule, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockBackupScheduleClient_Patch_Call) RunAndReturn(run func(context.Con func (_m *mockBackupScheduleClient) RemoveFinalizer(ctx context.Context, backupSchedule *v1.BackupSchedule, finalizer string) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, string) (*v1.BackupSchedule, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockBackupScheduleClient_RemoveFinalizer_Call) RunAndReturn(run func(c func (_m *mockBackupScheduleClient) Update(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.UpdateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.UpdateOptions) (*v1.BackupSchedule, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockBackupScheduleClient_Update_Call) RunAndReturn(run func(context.Co func (_m *mockBackupScheduleClient) UpdateStatus(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.UpdateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.UpdateOptions) (*v1.BackupSchedule, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockBackupScheduleClient_UpdateStatus_Call) RunAndReturn(run func(cont func (_m *mockBackupScheduleClient) UpdateStatusCreated(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCreated") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockBackupScheduleClient_UpdateStatusCreated_Call) RunAndReturn(run fu func (_m *mockBackupScheduleClient) UpdateStatusCreating(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCreating") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockBackupScheduleClient_UpdateStatusCreating_Call) RunAndReturn(run f func (_m *mockBackupScheduleClient) UpdateStatusDeleting(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockBackupScheduleClient_UpdateStatusDeleting_Call) RunAndReturn(run f func (_m *mockBackupScheduleClient) UpdateStatusFailed(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockBackupScheduleClient_UpdateStatusFailed_Call) RunAndReturn(run fun func (_m *mockBackupScheduleClient) UpdateStatusUpdating(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusUpdating") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -914,6 +978,10 @@ func (_c *mockBackupScheduleClient_UpdateStatusUpdating_Call) RunAndReturn(run f func (_m *mockBackupScheduleClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -965,13 +1033,12 @@ func (_c *mockBackupScheduleClient_Watch_Call) RunAndReturn(run func(context.Con return _c } -type mockConstructorTestingTnewMockBackupScheduleClient interface { +// newMockBackupScheduleClient creates a new instance of mockBackupScheduleClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupScheduleClient(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupScheduleClient creates a new instance of mockBackupScheduleClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupScheduleClient(t mockConstructorTestingTnewMockBackupScheduleClient) *mockBackupScheduleClient { +}) *mockBackupScheduleClient { mock := &mockBackupScheduleClient{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_batchV1Interface_test.go b/pkg/additionalimages/mock_batchV1Interface_test.go index 05a8967..b390364 100644 --- a/pkg/additionalimages/mock_batchV1Interface_test.go +++ b/pkg/additionalimages/mock_batchV1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -26,6 +26,10 @@ func (_m *mockBatchV1Interface) EXPECT() *mockBatchV1Interface_Expecter { func (_m *mockBatchV1Interface) CronJobs(namespace string) v1.CronJobInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for CronJobs") + } + var r0 v1.CronJobInterface if rf, ok := ret.Get(0).(func(string) v1.CronJobInterface); ok { r0 = rf(namespace) @@ -70,6 +74,10 @@ func (_c *mockBatchV1Interface_CronJobs_Call) RunAndReturn(run func(string) v1.C func (_m *mockBatchV1Interface) Jobs(namespace string) v1.JobInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Jobs") + } + var r0 v1.JobInterface if rf, ok := ret.Get(0).(func(string) v1.JobInterface); ok { r0 = rf(namespace) @@ -114,6 +122,10 @@ func (_c *mockBatchV1Interface_Jobs_Call) RunAndReturn(run func(string) v1.JobIn func (_m *mockBatchV1Interface) RESTClient() rest.Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + var r0 rest.Interface if rf, ok := ret.Get(0).(func() rest.Interface); ok { r0 = rf() @@ -153,13 +165,12 @@ func (_c *mockBatchV1Interface_RESTClient_Call) RunAndReturn(run func() rest.Int return _c } -type mockConstructorTestingTnewMockBatchV1Interface interface { +// newMockBatchV1Interface creates a new instance of mockBatchV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBatchV1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBatchV1Interface creates a new instance of mockBatchV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBatchV1Interface(t mockConstructorTestingTnewMockBatchV1Interface) *mockBatchV1Interface { +}) *mockBatchV1Interface { mock := &mockBatchV1Interface{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_cronJobInterface_test.go b/pkg/additionalimages/mock_cronJobInterface_test.go index 5d0471e..6a7cec1 100644 --- a/pkg/additionalimages/mock_cronJobInterface_test.go +++ b/pkg/additionalimages/mock_cronJobInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -35,6 +35,10 @@ func (_m *mockCronJobInterface) EXPECT() *mockCronJobInterface_Expecter { func (_m *mockCronJobInterface) Apply(ctx context.Context, cronJob *v1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for Apply") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.CronJobApplyConfiguration, metav1.ApplyOptions) (*batchv1.CronJob, error)); ok { @@ -91,6 +95,10 @@ func (_c *mockCronJobInterface_Apply_Call) RunAndReturn(run func(context.Context func (_m *mockCronJobInterface) ApplyStatus(ctx context.Context, cronJob *v1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyStatus") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.CronJobApplyConfiguration, metav1.ApplyOptions) (*batchv1.CronJob, error)); ok { @@ -147,6 +155,10 @@ func (_c *mockCronJobInterface_ApplyStatus_Call) RunAndReturn(run func(context.C func (_m *mockCronJobInterface) Create(ctx context.Context, cronJob *batchv1.CronJob, opts metav1.CreateOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *batchv1.CronJob, metav1.CreateOptions) (*batchv1.CronJob, error)); ok { @@ -203,6 +215,10 @@ func (_c *mockCronJobInterface_Create_Call) RunAndReturn(run func(context.Contex func (_m *mockCronJobInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -247,6 +263,10 @@ func (_c *mockCronJobInterface_Delete_Call) RunAndReturn(run func(context.Contex func (_m *mockCronJobInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -291,6 +311,10 @@ func (_c *mockCronJobInterface_DeleteCollection_Call) RunAndReturn(run func(cont func (_m *mockCronJobInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*batchv1.CronJob, error)); ok { @@ -347,6 +371,10 @@ func (_c *mockCronJobInterface_Get_Call) RunAndReturn(run func(context.Context, func (_m *mockCronJobInterface) List(ctx context.Context, opts metav1.ListOptions) (*batchv1.CronJobList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *batchv1.CronJobList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*batchv1.CronJobList, error)); ok { @@ -409,6 +437,10 @@ func (_m *mockCronJobInterface) Patch(ctx context.Context, name string, pt types _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*batchv1.CronJob, error)); ok { @@ -475,6 +507,10 @@ func (_c *mockCronJobInterface_Patch_Call) RunAndReturn(run func(context.Context func (_m *mockCronJobInterface) Update(ctx context.Context, cronJob *batchv1.CronJob, opts metav1.UpdateOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *batchv1.CronJob, metav1.UpdateOptions) (*batchv1.CronJob, error)); ok { @@ -531,6 +567,10 @@ func (_c *mockCronJobInterface_Update_Call) RunAndReturn(run func(context.Contex func (_m *mockCronJobInterface) UpdateStatus(ctx context.Context, cronJob *batchv1.CronJob, opts metav1.UpdateOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *batchv1.CronJob, metav1.UpdateOptions) (*batchv1.CronJob, error)); ok { @@ -587,6 +627,10 @@ func (_c *mockCronJobInterface_UpdateStatus_Call) RunAndReturn(run func(context. func (_m *mockCronJobInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -638,13 +682,12 @@ func (_c *mockCronJobInterface_Watch_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTnewMockCronJobInterface interface { +// newMockCronJobInterface creates a new instance of mockCronJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCronJobInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCronJobInterface creates a new instance of mockCronJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCronJobInterface(t mockConstructorTestingTnewMockCronJobInterface) *mockCronJobInterface { +}) *mockCronJobInterface { mock := &mockCronJobInterface{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_ecosystemClientSet_test.go b/pkg/additionalimages/mock_ecosystemClientSet_test.go index da05151..a8d45dc 100644 --- a/pkg/additionalimages/mock_ecosystemClientSet_test.go +++ b/pkg/additionalimages/mock_ecosystemClientSet_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemClientSet) EXPECT() *mockEcosystemClientSet_Expecter { func (_m *mockEcosystemClientSet) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemClientSet) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemClientSet) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemClientSet) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemClientSet_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemClientSet) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemClientSet) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemClientSet) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemClientSet) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemClientSet) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemClientSet) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemClientSet) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemClientSet) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemClientSet_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemClientSet) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemClientSet_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemClientSet) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemClientSet) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemClientSet_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemClientSet_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) CoordinationV1alpha1() *mockEcosystemClientSet_CoordinationV1alpha1_Call { + return &mockEcosystemClientSet_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemClientSet) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemClientSet_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemClientSet_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemClientSet) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemClientSet_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemClientSet) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemClientSet) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemClientSet_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemClientSet_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemClientSet) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemClientSet_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemClientSet) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemClientSet_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemClientSet_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemClientSet_FlowcontrolV1alpha1_Call struct { +// mockEcosystemClientSet_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemClientSet_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1alpha1() *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { - return &mockEcosystemClientSet_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1() *mockEcosystemClientSet_FlowcontrolV1_Call { + return &mockEcosystemClientSet_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemClientSet_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemClientSet) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemClientSet_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemClientSet) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemClientSet_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemClientSet) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemClientSet_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemClientSet) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemClientSet_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemClientSet) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemClientSet_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemClientSet) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemClientSet_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemClientSet) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemClientSet_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemClientSet) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemClientSet_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemClientSet_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemClientSet_ResourceV1alpha2_Call struct { +// mockEcosystemClientSet_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemClientSet_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha2() *mockEcosystemClientSet_ResourceV1alpha2_Call { - return &mockEcosystemClientSet_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha3() *mockEcosystemClientSet_ResourceV1alpha3_Call { + return &mockEcosystemClientSet_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemClientSet) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemClientSet_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemClientSet) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemClientSet_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemClientSet) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemClientSet_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemClientSet interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemClientSet_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) StoragemigrationV1alpha1() *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + return &mockEcosystemClientSet_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemClientSet creates a new instance of mockEcosystemClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemClientSet(t mockConstructorTestingTnewMockEcosystemClientSet) *mockEcosystemClientSet { +// The first argument is typically a *testing.T value. +func newMockEcosystemClientSet(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemClientSet { mock := &mockEcosystemClientSet{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_ecosystemV1Alpha1Interface_test.go b/pkg/additionalimages/mock_ecosystemV1Alpha1Interface_test.go index 263fcac..57dea85 100644 --- a/pkg/additionalimages/mock_ecosystemV1Alpha1Interface_test.go +++ b/pkg/additionalimages/mock_ecosystemV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -24,6 +24,10 @@ func (_m *mockEcosystemV1Alpha1Interface) EXPECT() *mockEcosystemV1Alpha1Interfa func (_m *mockEcosystemV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockEcosystemV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run func (_m *mockEcosystemV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockEcosystemV1Alpha1Interface_Backups_Call) RunAndReturn(run func(str func (_m *mockEcosystemV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockEcosystemV1Alpha1Interface_Restores_Call) RunAndReturn(run func(st return _c } -type mockConstructorTestingTnewMockEcosystemV1Alpha1Interface interface { +// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemV1Alpha1Interface(t mockConstructorTestingTnewMockEcosystemV1Alpha1Interface) *mockEcosystemV1Alpha1Interface { +}) *mockEcosystemV1Alpha1Interface { mock := &mockEcosystemV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/additionalimages/mock_eventRecorder_test.go b/pkg/additionalimages/mock_eventRecorder_test.go index cf5c237..46d4c02 100644 --- a/pkg/additionalimages/mock_eventRecorder_test.go +++ b/pkg/additionalimages/mock_eventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package additionalimages @@ -151,13 +151,12 @@ func (_c *mockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTnewMockEventRecorder interface { +// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEventRecorder(t mockConstructorTestingTnewMockEventRecorder) *mockEventRecorder { +}) *mockEventRecorder { mock := &mockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_BackupInterface_test.go b/pkg/api/ecosystem/mock_BackupInterface_test.go index bfecffe..a9d2bb4 100644 --- a/pkg/api/ecosystem/mock_BackupInterface_test.go +++ b/pkg/api/ecosystem/mock_BackupInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -32,6 +32,10 @@ func (_m *MockBackupInterface) EXPECT() *MockBackupInterface_Expecter { func (_m *MockBackupInterface) AddFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *MockBackupInterface_AddFinalizer_Call) RunAndReturn(run func(context.C func (_m *MockBackupInterface) AddLabels(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -143,6 +151,10 @@ func (_c *MockBackupInterface_AddLabels_Call) RunAndReturn(run func(context.Cont func (_m *MockBackupInterface) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -199,6 +211,10 @@ func (_c *MockBackupInterface_Create_Call) RunAndReturn(run func(context.Context func (_m *MockBackupInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *MockBackupInterface_Delete_Call) RunAndReturn(run func(context.Context func (_m *MockBackupInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *MockBackupInterface_DeleteCollection_Call) RunAndReturn(run func(conte func (_m *MockBackupInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -343,6 +367,10 @@ func (_c *MockBackupInterface_Get_Call) RunAndReturn(run func(context.Context, s func (_m *MockBackupInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -405,6 +433,10 @@ func (_m *MockBackupInterface) Patch(ctx context.Context, name string, pt types. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -471,6 +503,10 @@ func (_c *MockBackupInterface_Patch_Call) RunAndReturn(run func(context.Context, func (_m *MockBackupInterface) RemoveFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -527,6 +563,10 @@ func (_c *MockBackupInterface_RemoveFinalizer_Call) RunAndReturn(run func(contex func (_m *MockBackupInterface) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -583,6 +623,10 @@ func (_c *MockBackupInterface_Update_Call) RunAndReturn(run func(context.Context func (_m *MockBackupInterface) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -639,6 +683,10 @@ func (_c *MockBackupInterface_UpdateStatus_Call) RunAndReturn(run func(context.C func (_m *MockBackupInterface) UpdateStatusCompleted(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -694,6 +742,10 @@ func (_c *MockBackupInterface_UpdateStatusCompleted_Call) RunAndReturn(run func( func (_m *MockBackupInterface) UpdateStatusDeleting(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -749,6 +801,10 @@ func (_c *MockBackupInterface_UpdateStatusDeleting_Call) RunAndReturn(run func(c func (_m *MockBackupInterface) UpdateStatusFailed(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -804,6 +860,10 @@ func (_c *MockBackupInterface_UpdateStatusFailed_Call) RunAndReturn(run func(con func (_m *MockBackupInterface) UpdateStatusInProgress(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -859,6 +919,10 @@ func (_c *MockBackupInterface_UpdateStatusInProgress_Call) RunAndReturn(run func func (_m *MockBackupInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *MockBackupInterface_Watch_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTNewMockBackupInterface interface { +// NewMockBackupInterface creates a new instance of MockBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockBackupInterface(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockBackupInterface creates a new instance of MockBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockBackupInterface(t mockConstructorTestingTNewMockBackupInterface) *MockBackupInterface { +}) *MockBackupInterface { mock := &MockBackupInterface{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_BackupScheduleInterface_test.go b/pkg/api/ecosystem/mock_BackupScheduleInterface_test.go index a5099fa..e62a784 100644 --- a/pkg/api/ecosystem/mock_BackupScheduleInterface_test.go +++ b/pkg/api/ecosystem/mock_BackupScheduleInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -32,6 +32,10 @@ func (_m *MockBackupScheduleInterface) EXPECT() *MockBackupScheduleInterface_Exp func (_m *MockBackupScheduleInterface) AddFinalizer(ctx context.Context, backupSchedule *v1.BackupSchedule, finalizer string) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, string) (*v1.BackupSchedule, error)); ok { @@ -88,6 +92,10 @@ func (_c *MockBackupScheduleInterface_AddFinalizer_Call) RunAndReturn(run func(c func (_m *MockBackupScheduleInterface) AddLabels(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -143,6 +151,10 @@ func (_c *MockBackupScheduleInterface_AddLabels_Call) RunAndReturn(run func(cont func (_m *MockBackupScheduleInterface) Create(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.CreateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.CreateOptions) (*v1.BackupSchedule, error)); ok { @@ -199,6 +211,10 @@ func (_c *MockBackupScheduleInterface_Create_Call) RunAndReturn(run func(context func (_m *MockBackupScheduleInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *MockBackupScheduleInterface_Delete_Call) RunAndReturn(run func(context func (_m *MockBackupScheduleInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *MockBackupScheduleInterface_DeleteCollection_Call) RunAndReturn(run fu func (_m *MockBackupScheduleInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.BackupSchedule, error)); ok { @@ -343,6 +367,10 @@ func (_c *MockBackupScheduleInterface_Get_Call) RunAndReturn(run func(context.Co func (_m *MockBackupScheduleInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupScheduleList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupScheduleList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupScheduleList, error)); ok { @@ -405,6 +433,10 @@ func (_m *MockBackupScheduleInterface) Patch(ctx context.Context, name string, p _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.BackupSchedule, error)); ok { @@ -471,6 +503,10 @@ func (_c *MockBackupScheduleInterface_Patch_Call) RunAndReturn(run func(context. func (_m *MockBackupScheduleInterface) RemoveFinalizer(ctx context.Context, backupSchedule *v1.BackupSchedule, finalizer string) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, string) (*v1.BackupSchedule, error)); ok { @@ -527,6 +563,10 @@ func (_c *MockBackupScheduleInterface_RemoveFinalizer_Call) RunAndReturn(run fun func (_m *MockBackupScheduleInterface) Update(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.UpdateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.UpdateOptions) (*v1.BackupSchedule, error)); ok { @@ -583,6 +623,10 @@ func (_c *MockBackupScheduleInterface_Update_Call) RunAndReturn(run func(context func (_m *MockBackupScheduleInterface) UpdateStatus(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.UpdateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.UpdateOptions) (*v1.BackupSchedule, error)); ok { @@ -639,6 +683,10 @@ func (_c *MockBackupScheduleInterface_UpdateStatus_Call) RunAndReturn(run func(c func (_m *MockBackupScheduleInterface) UpdateStatusCreated(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCreated") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -694,6 +742,10 @@ func (_c *MockBackupScheduleInterface_UpdateStatusCreated_Call) RunAndReturn(run func (_m *MockBackupScheduleInterface) UpdateStatusCreating(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCreating") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -749,6 +801,10 @@ func (_c *MockBackupScheduleInterface_UpdateStatusCreating_Call) RunAndReturn(ru func (_m *MockBackupScheduleInterface) UpdateStatusDeleting(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -804,6 +860,10 @@ func (_c *MockBackupScheduleInterface_UpdateStatusDeleting_Call) RunAndReturn(ru func (_m *MockBackupScheduleInterface) UpdateStatusFailed(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -859,6 +919,10 @@ func (_c *MockBackupScheduleInterface_UpdateStatusFailed_Call) RunAndReturn(run func (_m *MockBackupScheduleInterface) UpdateStatusUpdating(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusUpdating") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -914,6 +978,10 @@ func (_c *MockBackupScheduleInterface_UpdateStatusUpdating_Call) RunAndReturn(ru func (_m *MockBackupScheduleInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -965,13 +1033,12 @@ func (_c *MockBackupScheduleInterface_Watch_Call) RunAndReturn(run func(context. return _c } -type mockConstructorTestingTNewMockBackupScheduleInterface interface { +// NewMockBackupScheduleInterface creates a new instance of MockBackupScheduleInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockBackupScheduleInterface(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockBackupScheduleInterface creates a new instance of MockBackupScheduleInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockBackupScheduleInterface(t mockConstructorTestingTNewMockBackupScheduleInterface) *MockBackupScheduleInterface { +}) *MockBackupScheduleInterface { mock := &MockBackupScheduleInterface{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_BackupSchedulesGetter_test.go b/pkg/api/ecosystem/mock_BackupSchedulesGetter_test.go index 70ed2fc..851d2e3 100644 --- a/pkg/api/ecosystem/mock_BackupSchedulesGetter_test.go +++ b/pkg/api/ecosystem/mock_BackupSchedulesGetter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -21,6 +21,10 @@ func (_m *MockBackupSchedulesGetter) EXPECT() *MockBackupSchedulesGetter_Expecte func (_m *MockBackupSchedulesGetter) BackupSchedules(namespace string) BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) BackupScheduleInterface); ok { r0 = rf(namespace) @@ -61,13 +65,12 @@ func (_c *MockBackupSchedulesGetter_BackupSchedules_Call) RunAndReturn(run func( return _c } -type mockConstructorTestingTNewMockBackupSchedulesGetter interface { +// NewMockBackupSchedulesGetter creates a new instance of MockBackupSchedulesGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockBackupSchedulesGetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockBackupSchedulesGetter creates a new instance of MockBackupSchedulesGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockBackupSchedulesGetter(t mockConstructorTestingTNewMockBackupSchedulesGetter) *MockBackupSchedulesGetter { +}) *MockBackupSchedulesGetter { mock := &MockBackupSchedulesGetter{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_BackupsGetter_test.go b/pkg/api/ecosystem/mock_BackupsGetter_test.go index 7e017f9..93a3393 100644 --- a/pkg/api/ecosystem/mock_BackupsGetter_test.go +++ b/pkg/api/ecosystem/mock_BackupsGetter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -21,6 +21,10 @@ func (_m *MockBackupsGetter) EXPECT() *MockBackupsGetter_Expecter { func (_m *MockBackupsGetter) Backups(namespace string) BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 BackupInterface if rf, ok := ret.Get(0).(func(string) BackupInterface); ok { r0 = rf(namespace) @@ -61,13 +65,12 @@ func (_c *MockBackupsGetter_Backups_Call) RunAndReturn(run func(string) BackupIn return _c } -type mockConstructorTestingTNewMockBackupsGetter interface { +// NewMockBackupsGetter creates a new instance of MockBackupsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockBackupsGetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockBackupsGetter creates a new instance of MockBackupsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockBackupsGetter(t mockConstructorTestingTNewMockBackupsGetter) *MockBackupsGetter { +}) *MockBackupsGetter { mock := &MockBackupsGetter{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_Interface_test.go b/pkg/api/ecosystem/mock_Interface_test.go index 369fd6d..7f9780e 100644 --- a/pkg/api/ecosystem/mock_Interface_test.go +++ b/pkg/api/ecosystem/mock_Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -48,7 +50,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -84,6 +86,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -94,7 +98,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -126,6 +130,10 @@ func (_m *MockInterface) EXPECT() *MockInterface_Expecter { func (_m *MockInterface) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -169,6 +177,10 @@ func (_c *MockInterface_AdmissionregistrationV1_Call) RunAndReturn(run func() v1 func (_m *MockInterface) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -212,6 +224,10 @@ func (_c *MockInterface_AdmissionregistrationV1alpha1_Call) RunAndReturn(run fun func (_m *MockInterface) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -255,6 +271,10 @@ func (_c *MockInterface_AdmissionregistrationV1beta1_Call) RunAndReturn(run func func (_m *MockInterface) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -298,6 +318,10 @@ func (_c *MockInterface_AppsV1_Call) RunAndReturn(run func() appsv1.AppsV1Interf func (_m *MockInterface) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -341,6 +365,10 @@ func (_c *MockInterface_AppsV1beta1_Call) RunAndReturn(run func() appsv1beta1.Ap func (_m *MockInterface) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -384,6 +412,10 @@ func (_c *MockInterface_AppsV1beta2_Call) RunAndReturn(run func() v1beta2.AppsV1 func (_m *MockInterface) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -427,6 +459,10 @@ func (_c *MockInterface_AuthenticationV1_Call) RunAndReturn(run func() authentic func (_m *MockInterface) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -470,6 +506,10 @@ func (_c *MockInterface_AuthenticationV1alpha1_Call) RunAndReturn(run func() aut func (_m *MockInterface) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -513,6 +553,10 @@ func (_c *MockInterface_AuthenticationV1beta1_Call) RunAndReturn(run func() auth func (_m *MockInterface) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -556,6 +600,10 @@ func (_c *MockInterface_AuthorizationV1_Call) RunAndReturn(run func() authorizat func (_m *MockInterface) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -599,6 +647,10 @@ func (_c *MockInterface_AuthorizationV1beta1_Call) RunAndReturn(run func() autho func (_m *MockInterface) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -642,6 +694,10 @@ func (_c *MockInterface_AutoscalingV1_Call) RunAndReturn(run func() autoscalingv func (_m *MockInterface) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -685,6 +741,10 @@ func (_c *MockInterface_AutoscalingV2_Call) RunAndReturn(run func() v2.Autoscali func (_m *MockInterface) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -728,6 +788,10 @@ func (_c *MockInterface_AutoscalingV2beta1_Call) RunAndReturn(run func() v2beta1 func (_m *MockInterface) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -771,6 +835,10 @@ func (_c *MockInterface_AutoscalingV2beta2_Call) RunAndReturn(run func() v2beta2 func (_m *MockInterface) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -814,6 +882,10 @@ func (_c *MockInterface_BatchV1_Call) RunAndReturn(run func() batchv1.BatchV1Int func (_m *MockInterface) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -857,6 +929,10 @@ func (_c *MockInterface_BatchV1beta1_Call) RunAndReturn(run func() batchv1beta1. func (_m *MockInterface) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -900,6 +976,10 @@ func (_c *MockInterface_CertificatesV1_Call) RunAndReturn(run func() certificate func (_m *MockInterface) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -943,6 +1023,10 @@ func (_c *MockInterface_CertificatesV1alpha1_Call) RunAndReturn(run func() certi func (_m *MockInterface) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -986,6 +1070,10 @@ func (_c *MockInterface_CertificatesV1beta1_Call) RunAndReturn(run func() certif func (_m *MockInterface) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1025,10 +1113,61 @@ func (_c *MockInterface_CoordinationV1_Call) RunAndReturn(run func() coordinatio return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *MockInterface) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// MockInterface_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type MockInterface_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *MockInterface_Expecter) CoordinationV1alpha1() *MockInterface_CoordinationV1alpha1_Call { + return &MockInterface_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *MockInterface_CoordinationV1alpha1_Call) Run(run func()) *MockInterface_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockInterface_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *MockInterface_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockInterface_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *MockInterface_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *MockInterface) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1072,6 +1211,10 @@ func (_c *MockInterface_CoordinationV1beta1_Call) RunAndReturn(run func() coordi func (_m *MockInterface) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1115,6 +1258,10 @@ func (_c *MockInterface_CoreV1_Call) RunAndReturn(run func() corev1.CoreV1Interf func (_m *MockInterface) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1158,6 +1305,10 @@ func (_c *MockInterface_Discovery_Call) RunAndReturn(run func() discovery.Discov func (_m *MockInterface) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1201,6 +1352,10 @@ func (_c *MockInterface_DiscoveryV1_Call) RunAndReturn(run func() discoveryv1.Di func (_m *MockInterface) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1244,6 +1399,10 @@ func (_c *MockInterface_DiscoveryV1beta1_Call) RunAndReturn(run func() discovery func (_m *MockInterface) EcosystemV1Alpha1() V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 V1Alpha1Interface if rf, ok := ret.Get(0).(func() V1Alpha1Interface); ok { r0 = rf() @@ -1287,6 +1446,10 @@ func (_c *MockInterface_EcosystemV1Alpha1_Call) RunAndReturn(run func() V1Alpha1 func (_m *MockInterface) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1330,6 +1493,10 @@ func (_c *MockInterface_EventsV1_Call) RunAndReturn(run func() eventsv1.EventsV1 func (_m *MockInterface) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1373,6 +1540,10 @@ func (_c *MockInterface_EventsV1beta1_Call) RunAndReturn(run func() eventsv1beta func (_m *MockInterface) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1412,45 +1583,49 @@ func (_c *MockInterface_ExtensionsV1beta1_Call) RunAndReturn(run func() extensio return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *MockInterface) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *MockInterface) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// MockInterface_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type MockInterface_FlowcontrolV1alpha1_Call struct { +// MockInterface_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type MockInterface_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *MockInterface_Expecter) FlowcontrolV1alpha1() *MockInterface_FlowcontrolV1alpha1_Call { - return &MockInterface_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *MockInterface_Expecter) FlowcontrolV1() *MockInterface_FlowcontrolV1_Call { + return &MockInterface_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *MockInterface_FlowcontrolV1alpha1_Call) Run(run func()) *MockInterface_FlowcontrolV1alpha1_Call { +func (_c *MockInterface_FlowcontrolV1_Call) Run(run func()) *MockInterface_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *MockInterface_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *MockInterface_FlowcontrolV1alpha1_Call { +func (_c *MockInterface_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *MockInterface_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *MockInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *MockInterface_FlowcontrolV1alpha1_Call { +func (_c *MockInterface_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *MockInterface_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1459,6 +1634,10 @@ func (_c *MockInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowco func (_m *MockInterface) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1502,6 +1681,10 @@ func (_c *MockInterface_FlowcontrolV1beta1_Call) RunAndReturn(run func() flowcon func (_m *MockInterface) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1545,6 +1728,10 @@ func (_c *MockInterface_FlowcontrolV1beta2_Call) RunAndReturn(run func() flowcon func (_m *MockInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1588,6 +1775,10 @@ func (_c *MockInterface_FlowcontrolV1beta3_Call) RunAndReturn(run func() v1beta3 func (_m *MockInterface) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1631,6 +1822,10 @@ func (_c *MockInterface_InternalV1alpha1_Call) RunAndReturn(run func() apiserver func (_m *MockInterface) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1674,6 +1869,10 @@ func (_c *MockInterface_NetworkingV1_Call) RunAndReturn(run func() networkingv1. func (_m *MockInterface) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1717,6 +1916,10 @@ func (_c *MockInterface_NetworkingV1alpha1_Call) RunAndReturn(run func() network func (_m *MockInterface) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1760,6 +1963,10 @@ func (_c *MockInterface_NetworkingV1beta1_Call) RunAndReturn(run func() networki func (_m *MockInterface) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1803,6 +2010,10 @@ func (_c *MockInterface_NodeV1_Call) RunAndReturn(run func() nodev1.NodeV1Interf func (_m *MockInterface) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1846,6 +2057,10 @@ func (_c *MockInterface_NodeV1alpha1_Call) RunAndReturn(run func() nodev1alpha1. func (_m *MockInterface) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1889,6 +2104,10 @@ func (_c *MockInterface_NodeV1beta1_Call) RunAndReturn(run func() nodev1beta1.No func (_m *MockInterface) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1932,6 +2151,10 @@ func (_c *MockInterface_PolicyV1_Call) RunAndReturn(run func() policyv1.PolicyV1 func (_m *MockInterface) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1975,6 +2198,10 @@ func (_c *MockInterface_PolicyV1beta1_Call) RunAndReturn(run func() policyv1beta func (_m *MockInterface) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2018,6 +2245,10 @@ func (_c *MockInterface_RbacV1_Call) RunAndReturn(run func() rbacv1.RbacV1Interf func (_m *MockInterface) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2061,6 +2292,10 @@ func (_c *MockInterface_RbacV1alpha1_Call) RunAndReturn(run func() rbacv1alpha1. func (_m *MockInterface) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2100,45 +2335,49 @@ func (_c *MockInterface_RbacV1beta1_Call) RunAndReturn(run func() rbacv1beta1.Rb return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *MockInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *MockInterface) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// MockInterface_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type MockInterface_ResourceV1alpha2_Call struct { +// MockInterface_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type MockInterface_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *MockInterface_Expecter) ResourceV1alpha2() *MockInterface_ResourceV1alpha2_Call { - return &MockInterface_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *MockInterface_Expecter) ResourceV1alpha3() *MockInterface_ResourceV1alpha3_Call { + return &MockInterface_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *MockInterface_ResourceV1alpha2_Call) Run(run func()) *MockInterface_ResourceV1alpha2_Call { +func (_c *MockInterface_ResourceV1alpha3_Call) Run(run func()) *MockInterface_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *MockInterface_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *MockInterface_ResourceV1alpha2_Call { +func (_c *MockInterface_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *MockInterface_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *MockInterface_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *MockInterface_ResourceV1alpha2_Call { +func (_c *MockInterface_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *MockInterface_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2147,6 +2386,10 @@ func (_c *MockInterface_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2. func (_m *MockInterface) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2190,6 +2433,10 @@ func (_c *MockInterface_SchedulingV1_Call) RunAndReturn(run func() schedulingv1. func (_m *MockInterface) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2233,6 +2480,10 @@ func (_c *MockInterface_SchedulingV1alpha1_Call) RunAndReturn(run func() schedul func (_m *MockInterface) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2276,6 +2527,10 @@ func (_c *MockInterface_SchedulingV1beta1_Call) RunAndReturn(run func() scheduli func (_m *MockInterface) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2319,6 +2574,10 @@ func (_c *MockInterface_StorageV1_Call) RunAndReturn(run func() storagev1.Storag func (_m *MockInterface) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2362,6 +2621,10 @@ func (_c *MockInterface_StorageV1alpha1_Call) RunAndReturn(run func() storagev1a func (_m *MockInterface) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2401,13 +2664,59 @@ func (_c *MockInterface_StorageV1beta1_Call) RunAndReturn(run func() storagev1be return _c } -type mockConstructorTestingTNewMockInterface interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *MockInterface) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// MockInterface_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type MockInterface_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *MockInterface_Expecter) StoragemigrationV1alpha1() *MockInterface_StoragemigrationV1alpha1_Call { + return &MockInterface_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *MockInterface_StoragemigrationV1alpha1_Call) Run(run func()) *MockInterface_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockInterface_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *MockInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockInterface_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *MockInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface { +// The first argument is typically a *testing.T value. +func NewMockInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *MockInterface { mock := &MockInterface{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_RestoreInterface_test.go b/pkg/api/ecosystem/mock_RestoreInterface_test.go index 8f14772..51bd440 100644 --- a/pkg/api/ecosystem/mock_RestoreInterface_test.go +++ b/pkg/api/ecosystem/mock_RestoreInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -32,6 +32,10 @@ func (_m *MockRestoreInterface) EXPECT() *MockRestoreInterface_Expecter { func (_m *MockRestoreInterface) AddFinalizer(ctx context.Context, restore *v1.Restore, finalizer string) (*v1.Restore, error) { ret := _m.Called(ctx, restore, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, string) (*v1.Restore, error)); ok { @@ -88,6 +92,10 @@ func (_c *MockRestoreInterface_AddFinalizer_Call) RunAndReturn(run func(context. func (_m *MockRestoreInterface) AddLabels(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -143,6 +151,10 @@ func (_c *MockRestoreInterface_AddLabels_Call) RunAndReturn(run func(context.Con func (_m *MockRestoreInterface) Create(ctx context.Context, restore *v1.Restore, opts metav1.CreateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.CreateOptions) (*v1.Restore, error)); ok { @@ -199,6 +211,10 @@ func (_c *MockRestoreInterface_Create_Call) RunAndReturn(run func(context.Contex func (_m *MockRestoreInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *MockRestoreInterface_Delete_Call) RunAndReturn(run func(context.Contex func (_m *MockRestoreInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *MockRestoreInterface_DeleteCollection_Call) RunAndReturn(run func(cont func (_m *MockRestoreInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Restore, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Restore, error)); ok { @@ -343,6 +367,10 @@ func (_c *MockRestoreInterface_Get_Call) RunAndReturn(run func(context.Context, func (_m *MockRestoreInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.RestoreList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.RestoreList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.RestoreList, error)); ok { @@ -405,6 +433,10 @@ func (_m *MockRestoreInterface) Patch(ctx context.Context, name string, pt types _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Restore, error)); ok { @@ -471,6 +503,10 @@ func (_c *MockRestoreInterface_Patch_Call) RunAndReturn(run func(context.Context func (_m *MockRestoreInterface) RemoveFinalizer(ctx context.Context, restore *v1.Restore, finalizer string) (*v1.Restore, error) { ret := _m.Called(ctx, restore, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, string) (*v1.Restore, error)); ok { @@ -527,6 +563,10 @@ func (_c *MockRestoreInterface_RemoveFinalizer_Call) RunAndReturn(run func(conte func (_m *MockRestoreInterface) Update(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -583,6 +623,10 @@ func (_c *MockRestoreInterface_Update_Call) RunAndReturn(run func(context.Contex func (_m *MockRestoreInterface) UpdateStatus(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -639,6 +683,10 @@ func (_c *MockRestoreInterface_UpdateStatus_Call) RunAndReturn(run func(context. func (_m *MockRestoreInterface) UpdateStatusCompleted(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -694,6 +742,10 @@ func (_c *MockRestoreInterface_UpdateStatusCompleted_Call) RunAndReturn(run func func (_m *MockRestoreInterface) UpdateStatusDeleting(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -749,6 +801,10 @@ func (_c *MockRestoreInterface_UpdateStatusDeleting_Call) RunAndReturn(run func( func (_m *MockRestoreInterface) UpdateStatusFailed(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -804,6 +860,10 @@ func (_c *MockRestoreInterface_UpdateStatusFailed_Call) RunAndReturn(run func(co func (_m *MockRestoreInterface) UpdateStatusInProgress(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -859,6 +919,10 @@ func (_c *MockRestoreInterface_UpdateStatusInProgress_Call) RunAndReturn(run fun func (_m *MockRestoreInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *MockRestoreInterface_Watch_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTNewMockRestoreInterface interface { +// NewMockRestoreInterface creates a new instance of MockRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRestoreInterface(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockRestoreInterface creates a new instance of MockRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockRestoreInterface(t mockConstructorTestingTNewMockRestoreInterface) *MockRestoreInterface { +}) *MockRestoreInterface { mock := &MockRestoreInterface{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_RestoresGetter_test.go b/pkg/api/ecosystem/mock_RestoresGetter_test.go index 4f02e26..4f979da 100644 --- a/pkg/api/ecosystem/mock_RestoresGetter_test.go +++ b/pkg/api/ecosystem/mock_RestoresGetter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -21,6 +21,10 @@ func (_m *MockRestoresGetter) EXPECT() *MockRestoresGetter_Expecter { func (_m *MockRestoresGetter) Restores(namespace string) RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 RestoreInterface if rf, ok := ret.Get(0).(func(string) RestoreInterface); ok { r0 = rf(namespace) @@ -61,13 +65,12 @@ func (_c *MockRestoresGetter_Restores_Call) RunAndReturn(run func(string) Restor return _c } -type mockConstructorTestingTNewMockRestoresGetter interface { +// NewMockRestoresGetter creates a new instance of MockRestoresGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRestoresGetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockRestoresGetter creates a new instance of MockRestoresGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockRestoresGetter(t mockConstructorTestingTNewMockRestoresGetter) *MockRestoresGetter { +}) *MockRestoresGetter { mock := &MockRestoresGetter{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_V1Alpha1Interface_test.go b/pkg/api/ecosystem/mock_V1Alpha1Interface_test.go index 1d04de7..fc4f44b 100644 --- a/pkg/api/ecosystem/mock_V1Alpha1Interface_test.go +++ b/pkg/api/ecosystem/mock_V1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -21,6 +21,10 @@ func (_m *MockV1Alpha1Interface) EXPECT() *MockV1Alpha1Interface_Expecter { func (_m *MockV1Alpha1Interface) BackupSchedules(namespace string) BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) BackupScheduleInterface); ok { r0 = rf(namespace) @@ -65,6 +69,10 @@ func (_c *MockV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run func(stri func (_m *MockV1Alpha1Interface) Backups(namespace string) BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 BackupInterface if rf, ok := ret.Get(0).(func(string) BackupInterface); ok { r0 = rf(namespace) @@ -109,6 +117,10 @@ func (_c *MockV1Alpha1Interface_Backups_Call) RunAndReturn(run func(string) Back func (_m *MockV1Alpha1Interface) Restores(namespace string) RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 RestoreInterface if rf, ok := ret.Get(0).(func(string) RestoreInterface); ok { r0 = rf(namespace) @@ -149,13 +161,12 @@ func (_c *MockV1Alpha1Interface_Restores_Call) RunAndReturn(run func(string) Res return _c } -type mockConstructorTestingTNewMockV1Alpha1Interface interface { +// NewMockV1Alpha1Interface creates a new instance of MockV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockV1Alpha1Interface creates a new instance of MockV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockV1Alpha1Interface(t mockConstructorTestingTNewMockV1Alpha1Interface) *MockV1Alpha1Interface { +}) *MockV1Alpha1Interface { mock := &MockV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/api/ecosystem/mock_restInterface_test.go b/pkg/api/ecosystem/mock_restInterface_test.go index 2ac7aec..31bcad9 100644 --- a/pkg/api/ecosystem/mock_restInterface_test.go +++ b/pkg/api/ecosystem/mock_restInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package ecosystem @@ -30,6 +30,10 @@ func (_m *mockRestInterface) EXPECT() *mockRestInterface_Expecter { func (_m *mockRestInterface) APIVersion() schema.GroupVersion { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for APIVersion") + } + var r0 schema.GroupVersion if rf, ok := ret.Get(0).(func() schema.GroupVersion); ok { r0 = rf() @@ -71,6 +75,10 @@ func (_c *mockRestInterface_APIVersion_Call) RunAndReturn(run func() schema.Grou func (_m *mockRestInterface) Delete() *rest.Request { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 *rest.Request if rf, ok := ret.Get(0).(func() *rest.Request); ok { r0 = rf() @@ -114,6 +122,10 @@ func (_c *mockRestInterface_Delete_Call) RunAndReturn(run func() *rest.Request) func (_m *mockRestInterface) Get() *rest.Request { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *rest.Request if rf, ok := ret.Get(0).(func() *rest.Request); ok { r0 = rf() @@ -157,6 +169,10 @@ func (_c *mockRestInterface_Get_Call) RunAndReturn(run func() *rest.Request) *mo func (_m *mockRestInterface) GetRateLimiter() flowcontrol.RateLimiter { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRateLimiter") + } + var r0 flowcontrol.RateLimiter if rf, ok := ret.Get(0).(func() flowcontrol.RateLimiter); ok { r0 = rf() @@ -200,6 +216,10 @@ func (_c *mockRestInterface_GetRateLimiter_Call) RunAndReturn(run func() flowcon func (_m *mockRestInterface) Patch(pt types.PatchType) *rest.Request { ret := _m.Called(pt) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *rest.Request if rf, ok := ret.Get(0).(func(types.PatchType) *rest.Request); ok { r0 = rf(pt) @@ -244,6 +264,10 @@ func (_c *mockRestInterface_Patch_Call) RunAndReturn(run func(types.PatchType) * func (_m *mockRestInterface) Post() *rest.Request { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Post") + } + var r0 *rest.Request if rf, ok := ret.Get(0).(func() *rest.Request); ok { r0 = rf() @@ -287,6 +311,10 @@ func (_c *mockRestInterface_Post_Call) RunAndReturn(run func() *rest.Request) *m func (_m *mockRestInterface) Put() *rest.Request { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Put") + } + var r0 *rest.Request if rf, ok := ret.Get(0).(func() *rest.Request); ok { r0 = rf() @@ -330,6 +358,10 @@ func (_c *mockRestInterface_Put_Call) RunAndReturn(run func() *rest.Request) *mo func (_m *mockRestInterface) Verb(verb string) *rest.Request { ret := _m.Called(verb) + if len(ret) == 0 { + panic("no return value specified for Verb") + } + var r0 *rest.Request if rf, ok := ret.Get(0).(func(string) *rest.Request); ok { r0 = rf(verb) @@ -370,13 +402,12 @@ func (_c *mockRestInterface_Verb_Call) RunAndReturn(run func(string) *rest.Reque return _c } -type mockConstructorTestingTnewMockRestInterface interface { +// newMockRestInterface creates a new instance of mockRestInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRestInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRestInterface creates a new instance of mockRestInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRestInterface(t mockConstructorTestingTnewMockRestInterface) *mockRestInterface { +}) *mockRestInterface { mock := &mockRestInterface{} mock.Mock.Test(t) diff --git a/pkg/api/v1/mock_RequeuableObject_test.go b/pkg/api/v1/mock_RequeuableObject_test.go index 99b91f1..95cd4d5 100644 --- a/pkg/api/v1/mock_RequeuableObject_test.go +++ b/pkg/api/v1/mock_RequeuableObject_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package v1 @@ -26,6 +26,10 @@ func (_m *MockRequeuableObject) EXPECT() *MockRequeuableObject_Expecter { func (_m *MockRequeuableObject) DeepCopyObject() runtime.Object { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DeepCopyObject") + } + var r0 runtime.Object if rf, ok := ret.Get(0).(func() runtime.Object); ok { r0 = rf() @@ -69,6 +73,10 @@ func (_c *MockRequeuableObject_DeepCopyObject_Call) RunAndReturn(run func() runt func (_m *MockRequeuableObject) GetName() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetName") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -110,6 +118,10 @@ func (_c *MockRequeuableObject_GetName_Call) RunAndReturn(run func() string) *Mo func (_m *MockRequeuableObject) GetObjectKind() schema.ObjectKind { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetObjectKind") + } + var r0 schema.ObjectKind if rf, ok := ret.Get(0).(func() schema.ObjectKind); ok { r0 = rf() @@ -153,6 +165,10 @@ func (_c *MockRequeuableObject_GetObjectKind_Call) RunAndReturn(run func() schem func (_m *MockRequeuableObject) GetStatus() RequeueableStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetStatus") + } + var r0 RequeueableStatus if rf, ok := ret.Get(0).(func() RequeueableStatus); ok { r0 = rf() @@ -192,13 +208,12 @@ func (_c *MockRequeuableObject_GetStatus_Call) RunAndReturn(run func() Requeueab return _c } -type mockConstructorTestingTNewMockRequeuableObject interface { +// NewMockRequeuableObject creates a new instance of MockRequeuableObject. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRequeuableObject(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockRequeuableObject creates a new instance of MockRequeuableObject. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockRequeuableObject(t mockConstructorTestingTNewMockRequeuableObject) *MockRequeuableObject { +}) *MockRequeuableObject { mock := &MockRequeuableObject{} mock.Mock.Test(t) diff --git a/pkg/api/v1/mock_RequeueableStatus_test.go b/pkg/api/v1/mock_RequeueableStatus_test.go index 2d5bc05..04c29a6 100644 --- a/pkg/api/v1/mock_RequeueableStatus_test.go +++ b/pkg/api/v1/mock_RequeueableStatus_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package v1 @@ -25,6 +25,10 @@ func (_m *MockRequeueableStatus) EXPECT() *MockRequeueableStatus_Expecter { func (_m *MockRequeueableStatus) GetRequeueTimeNanos() time.Duration { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRequeueTimeNanos") + } + var r0 time.Duration if rf, ok := ret.Get(0).(func() time.Duration); ok { r0 = rf() @@ -66,6 +70,10 @@ func (_c *MockRequeueableStatus_GetRequeueTimeNanos_Call) RunAndReturn(run func( func (_m *MockRequeueableStatus) GetStatus() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetStatus") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -103,13 +111,12 @@ func (_c *MockRequeueableStatus_GetStatus_Call) RunAndReturn(run func() string) return _c } -type mockConstructorTestingTNewMockRequeueableStatus interface { +// NewMockRequeueableStatus creates a new instance of MockRequeueableStatus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRequeueableStatus(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockRequeueableStatus creates a new instance of MockRequeueableStatus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockRequeueableStatus(t mockConstructorTestingTNewMockRequeueableStatus) *MockRequeueableStatus { +}) *MockRequeueableStatus { mock := &MockRequeueableStatus{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_MaintenanceModeSwitch_test.go b/pkg/backup/mock_MaintenanceModeSwitch_test.go index c074e9a..42aa2e9 100644 --- a/pkg/backup/mock_MaintenanceModeSwitch_test.go +++ b/pkg/backup/mock_MaintenanceModeSwitch_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -25,6 +25,10 @@ func (_m *MockMaintenanceModeSwitch) EXPECT() *MockMaintenanceModeSwitch_Expecte func (_m *MockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { ret := _m.Called(ctx, title, text) + if len(ret) == 0 { + panic("no return value specified for ActivateMaintenanceMode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, title, text) @@ -69,6 +73,10 @@ func (_c *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) RunAndReturn(r func (_m *MockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for DeactivateMaintenanceMode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -107,13 +115,12 @@ func (_c *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) RunAndReturn return _c } -type mockConstructorTestingTNewMockMaintenanceModeSwitch interface { +// NewMockMaintenanceModeSwitch creates a new instance of MockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockMaintenanceModeSwitch(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockMaintenanceModeSwitch creates a new instance of MockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockMaintenanceModeSwitch(t mockConstructorTestingTNewMockMaintenanceModeSwitch) *MockMaintenanceModeSwitch { +}) *MockMaintenanceModeSwitch { mock := &MockMaintenanceModeSwitch{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_backupControllerManager_test.go b/pkg/backup/mock_backupControllerManager_test.go index 7b84d68..0cc4808 100644 --- a/pkg/backup/mock_backupControllerManager_test.go +++ b/pkg/backup/mock_backupControllerManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -26,6 +26,10 @@ func (_m *mockBackupControllerManager) EXPECT() *mockBackupControllerManager_Exp func (_m *mockBackupControllerManager) create(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -69,6 +73,10 @@ func (_c *mockBackupControllerManager_create_Call) RunAndReturn(run func(context func (_m *mockBackupControllerManager) delete(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -112,6 +120,10 @@ func (_c *mockBackupControllerManager_delete_Call) RunAndReturn(run func(context func (_m *mockBackupControllerManager) syncStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for syncStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -151,13 +163,12 @@ func (_c *mockBackupControllerManager_syncStatus_Call) RunAndReturn(run func(con return _c } -type mockConstructorTestingTnewMockBackupControllerManager interface { +// newMockBackupControllerManager creates a new instance of mockBackupControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupControllerManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupControllerManager creates a new instance of mockBackupControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupControllerManager(t mockConstructorTestingTnewMockBackupControllerManager) *mockBackupControllerManager { +}) *mockBackupControllerManager { mock := &mockBackupControllerManager{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_backupProvider_test.go b/pkg/backup/mock_backupProvider_test.go index 9302107..e92d54f 100644 --- a/pkg/backup/mock_backupProvider_test.go +++ b/pkg/backup/mock_backupProvider_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -26,6 +26,10 @@ func (_m *mockBackupProvider) EXPECT() *mockBackupProvider_Expecter { func (_m *mockBackupProvider) CheckReady(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CheckReady") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -68,6 +72,10 @@ func (_c *mockBackupProvider_CheckReady_Call) RunAndReturn(run func(context.Cont func (_m *mockBackupProvider) CreateBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for CreateBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -111,6 +119,10 @@ func (_c *mockBackupProvider_CreateBackup_Call) RunAndReturn(run func(context.Co func (_m *mockBackupProvider) CreateRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for CreateRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -154,6 +166,10 @@ func (_c *mockBackupProvider_CreateRestore_Call) RunAndReturn(run func(context.C func (_m *mockBackupProvider) DeleteBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for DeleteBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -197,6 +213,10 @@ func (_c *mockBackupProvider_DeleteBackup_Call) RunAndReturn(run func(context.Co func (_m *mockBackupProvider) DeleteRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for DeleteRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -240,6 +260,10 @@ func (_c *mockBackupProvider_DeleteRestore_Call) RunAndReturn(run func(context.C func (_m *mockBackupProvider) SyncBackupStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for SyncBackupStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -283,6 +307,10 @@ func (_c *mockBackupProvider_SyncBackupStatus_Call) RunAndReturn(run func(contex func (_m *mockBackupProvider) SyncBackups(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SyncBackups") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -321,13 +349,12 @@ func (_c *mockBackupProvider_SyncBackups_Call) RunAndReturn(run func(context.Con return _c } -type mockConstructorTestingTnewMockBackupProvider interface { +// newMockBackupProvider creates a new instance of mockBackupProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupProvider(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupProvider creates a new instance of mockBackupProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupProvider(t mockConstructorTestingTnewMockBackupProvider) *mockBackupProvider { +}) *mockBackupProvider { mock := &mockBackupProvider{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_backupV1Alpha1Interface_test.go b/pkg/backup/mock_backupV1Alpha1Interface_test.go index 18e8195..2955266 100644 --- a/pkg/backup/mock_backupV1Alpha1Interface_test.go +++ b/pkg/backup/mock_backupV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -24,6 +24,10 @@ func (_m *mockBackupV1Alpha1Interface) EXPECT() *mockBackupV1Alpha1Interface_Exp func (_m *mockBackupV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockBackupV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run fun func (_m *mockBackupV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockBackupV1Alpha1Interface_Backups_Call) RunAndReturn(run func(string func (_m *mockBackupV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockBackupV1Alpha1Interface_Restores_Call) RunAndReturn(run func(strin return _c } -type mockConstructorTestingTnewMockBackupV1Alpha1Interface interface { +// newMockBackupV1Alpha1Interface creates a new instance of mockBackupV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupV1Alpha1Interface creates a new instance of mockBackupV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupV1Alpha1Interface(t mockConstructorTestingTnewMockBackupV1Alpha1Interface) *mockBackupV1Alpha1Interface { +}) *mockBackupV1Alpha1Interface { mock := &mockBackupV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_configurationContext_test.go b/pkg/backup/mock_configurationContext_test.go index 79ac595..96bcc17 100644 --- a/pkg/backup/mock_configurationContext_test.go +++ b/pkg/backup/mock_configurationContext_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -21,6 +21,10 @@ func (_m *mockConfigurationContext) EXPECT() *mockConfigurationContext_Expecter func (_m *mockConfigurationContext) Delete(key string) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(key) @@ -63,6 +67,10 @@ func (_c *mockConfigurationContext_Delete_Call) RunAndReturn(run func(string) er func (_m *mockConfigurationContext) DeleteRecursive(key string) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for DeleteRecursive") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(key) @@ -105,6 +113,10 @@ func (_c *mockConfigurationContext_DeleteRecursive_Call) RunAndReturn(run func(s func (_m *mockConfigurationContext) Exists(key string) (bool, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -157,6 +169,10 @@ func (_c *mockConfigurationContext_Exists_Call) RunAndReturn(run func(string) (b func (_m *mockConfigurationContext) Get(key string) (string, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -209,6 +225,10 @@ func (_c *mockConfigurationContext_Get_Call) RunAndReturn(run func(string) (stri func (_m *mockConfigurationContext) GetAll() (map[string]string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAll") + } + var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { @@ -262,6 +282,10 @@ func (_c *mockConfigurationContext_GetAll_Call) RunAndReturn(run func() (map[str func (_m *mockConfigurationContext) GetOrFalse(key string) (bool, string, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for GetOrFalse") + } + var r0 bool var r1 string var r2 error @@ -321,6 +345,10 @@ func (_c *mockConfigurationContext_GetOrFalse_Call) RunAndReturn(run func(string func (_m *mockConfigurationContext) Refresh(key string, timeToLiveInSeconds int) error { ret := _m.Called(key, timeToLiveInSeconds) + if len(ret) == 0 { + panic("no return value specified for Refresh") + } + var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(key, timeToLiveInSeconds) @@ -364,6 +392,10 @@ func (_c *mockConfigurationContext_Refresh_Call) RunAndReturn(run func(string, i func (_m *mockConfigurationContext) RemoveAll() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoveAll") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -405,6 +437,10 @@ func (_c *mockConfigurationContext_RemoveAll_Call) RunAndReturn(run func() error func (_m *mockConfigurationContext) Set(key string, value string) error { ret := _m.Called(key, value) + if len(ret) == 0 { + panic("no return value specified for Set") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(key, value) @@ -448,6 +484,10 @@ func (_c *mockConfigurationContext_Set_Call) RunAndReturn(run func(string, strin func (_m *mockConfigurationContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { ret := _m.Called(key, value, timeToLiveInSeconds) + if len(ret) == 0 { + panic("no return value specified for SetWithLifetime") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int) error); ok { r0 = rf(key, value, timeToLiveInSeconds) @@ -488,13 +528,12 @@ func (_c *mockConfigurationContext_SetWithLifetime_Call) RunAndReturn(run func(s return _c } -type mockConstructorTestingTnewMockConfigurationContext interface { +// newMockConfigurationContext creates a new instance of mockConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockConfigurationContext(t interface { mock.TestingT Cleanup(func()) -} - -// newMockConfigurationContext creates a new instance of mockConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockConfigurationContext(t mockConstructorTestingTnewMockConfigurationContext) *mockConfigurationContext { +}) *mockConfigurationContext { mock := &mockConfigurationContext{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_controllerManager_test.go b/pkg/backup/mock_controllerManager_test.go index d3c64a4..f9769b9 100644 --- a/pkg/backup/mock_controllerManager_test.go +++ b/pkg/backup/mock_controllerManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -48,6 +48,10 @@ func (_m *mockControllerManager) EXPECT() *mockControllerManager_Expecter { func (_m *mockControllerManager) Add(_a0 manager.Runnable) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 error if rf, ok := ret.Get(0).(func(manager.Runnable) error); ok { r0 = rf(_a0) @@ -90,6 +94,10 @@ func (_c *mockControllerManager_Add_Call) RunAndReturn(run func(manager.Runnable func (_m *mockControllerManager) AddHealthzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddHealthzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -129,10 +137,61 @@ func (_c *mockControllerManager_AddHealthzCheck_Call) RunAndReturn(run func(stri return _c } +// AddMetricsServerExtraHandler provides a mock function with given fields: path, handler +func (_m *mockControllerManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error { + ret := _m.Called(path, handler) + + if len(ret) == 0 { + panic("no return value specified for AddMetricsServerExtraHandler") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, http.Handler) error); ok { + r0 = rf(path, handler) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_AddMetricsServerExtraHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMetricsServerExtraHandler' +type mockControllerManager_AddMetricsServerExtraHandler_Call struct { + *mock.Call +} + +// AddMetricsServerExtraHandler is a helper method to define mock.On call +// - path string +// - handler http.Handler +func (_e *mockControllerManager_Expecter) AddMetricsServerExtraHandler(path interface{}, handler interface{}) *mockControllerManager_AddMetricsServerExtraHandler_Call { + return &mockControllerManager_AddMetricsServerExtraHandler_Call{Call: _e.mock.On("AddMetricsServerExtraHandler", path, handler)} +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Run(run func(path string, handler http.Handler)) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(http.Handler)) + }) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Return(_a0 error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) RunAndReturn(run func(string, http.Handler) error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(run) + return _c +} + // AddReadyzCheck provides a mock function with given fields: name, check func (_m *mockControllerManager) AddReadyzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddReadyzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -176,6 +235,10 @@ func (_c *mockControllerManager_AddReadyzCheck_Call) RunAndReturn(run func(strin func (_m *mockControllerManager) Elected() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Elected") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -219,6 +282,10 @@ func (_c *mockControllerManager_Elected_Call) RunAndReturn(run func() <-chan str func (_m *mockControllerManager) GetAPIReader() client.Reader { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAPIReader") + } + var r0 client.Reader if rf, ok := ret.Get(0).(func() client.Reader); ok { r0 = rf() @@ -262,6 +329,10 @@ func (_c *mockControllerManager_GetAPIReader_Call) RunAndReturn(run func() clien func (_m *mockControllerManager) GetCache() cache.Cache { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCache") + } + var r0 cache.Cache if rf, ok := ret.Get(0).(func() cache.Cache); ok { r0 = rf() @@ -305,6 +376,10 @@ func (_c *mockControllerManager_GetCache_Call) RunAndReturn(run func() cache.Cac func (_m *mockControllerManager) GetClient() client.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetClient") + } + var r0 client.Client if rf, ok := ret.Get(0).(func() client.Client); ok { r0 = rf() @@ -348,6 +423,10 @@ func (_c *mockControllerManager_GetClient_Call) RunAndReturn(run func() client.C func (_m *mockControllerManager) GetConfig() *rest.Config { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetConfig") + } + var r0 *rest.Config if rf, ok := ret.Get(0).(func() *rest.Config); ok { r0 = rf() @@ -391,6 +470,10 @@ func (_c *mockControllerManager_GetConfig_Call) RunAndReturn(run func() *rest.Co func (_m *mockControllerManager) GetControllerOptions() config.Controller { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetControllerOptions") + } + var r0 config.Controller if rf, ok := ret.Get(0).(func() config.Controller); ok { r0 = rf() @@ -432,6 +515,10 @@ func (_c *mockControllerManager_GetControllerOptions_Call) RunAndReturn(run func func (_m *mockControllerManager) GetEventRecorderFor(name string) record.EventRecorder { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for GetEventRecorderFor") + } + var r0 record.EventRecorder if rf, ok := ret.Get(0).(func(string) record.EventRecorder); ok { r0 = rf(name) @@ -476,6 +563,10 @@ func (_c *mockControllerManager_GetEventRecorderFor_Call) RunAndReturn(run func( func (_m *mockControllerManager) GetFieldIndexer() client.FieldIndexer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFieldIndexer") + } + var r0 client.FieldIndexer if rf, ok := ret.Get(0).(func() client.FieldIndexer); ok { r0 = rf() @@ -519,6 +610,10 @@ func (_c *mockControllerManager_GetFieldIndexer_Call) RunAndReturn(run func() cl func (_m *mockControllerManager) GetHTTPClient() *http.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHTTPClient") + } + var r0 *http.Client if rf, ok := ret.Get(0).(func() *http.Client); ok { r0 = rf() @@ -562,6 +657,10 @@ func (_c *mockControllerManager_GetHTTPClient_Call) RunAndReturn(run func() *htt func (_m *mockControllerManager) GetLogger() logr.Logger { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLogger") + } + var r0 logr.Logger if rf, ok := ret.Get(0).(func() logr.Logger); ok { r0 = rf() @@ -603,6 +702,10 @@ func (_c *mockControllerManager_GetLogger_Call) RunAndReturn(run func() logr.Log func (_m *mockControllerManager) GetRESTMapper() meta.RESTMapper { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRESTMapper") + } + var r0 meta.RESTMapper if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { r0 = rf() @@ -646,6 +749,10 @@ func (_c *mockControllerManager_GetRESTMapper_Call) RunAndReturn(run func() meta func (_m *mockControllerManager) GetScheme() *runtime.Scheme { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetScheme") + } + var r0 *runtime.Scheme if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { r0 = rf() @@ -689,6 +796,10 @@ func (_c *mockControllerManager_GetScheme_Call) RunAndReturn(run func() *runtime func (_m *mockControllerManager) GetWebhookServer() webhook.Server { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetWebhookServer") + } + var r0 webhook.Server if rf, ok := ret.Get(0).(func() webhook.Server); ok { r0 = rf() @@ -732,6 +843,10 @@ func (_c *mockControllerManager_GetWebhookServer_Call) RunAndReturn(run func() w func (_m *mockControllerManager) Start(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -770,13 +885,12 @@ func (_c *mockControllerManager_Start_Call) RunAndReturn(run func(context.Contex return _c } -type mockConstructorTestingTnewMockControllerManager interface { +// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockControllerManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockControllerManager(t mockConstructorTestingTnewMockControllerManager) *mockControllerManager { +}) *mockControllerManager { mock := &mockControllerManager{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_createManager_test.go b/pkg/backup/mock_createManager_test.go index 9a62ec5..e8cd447 100644 --- a/pkg/backup/mock_createManager_test.go +++ b/pkg/backup/mock_createManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -26,6 +26,10 @@ func (_m *mockCreateManager) EXPECT() *mockCreateManager_Expecter { func (_m *mockCreateManager) create(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -65,13 +69,12 @@ func (_c *mockCreateManager_create_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockCreateManager interface { +// newMockCreateManager creates a new instance of mockCreateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCreateManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCreateManager creates a new instance of mockCreateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCreateManager(t mockConstructorTestingTnewMockCreateManager) *mockCreateManager { +}) *mockCreateManager { mock := &mockCreateManager{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_deleteManager_test.go b/pkg/backup/mock_deleteManager_test.go index 74c5697..65dba5f 100644 --- a/pkg/backup/mock_deleteManager_test.go +++ b/pkg/backup/mock_deleteManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -26,6 +26,10 @@ func (_m *mockDeleteManager) EXPECT() *mockDeleteManager_Expecter { func (_m *mockDeleteManager) delete(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -65,13 +69,12 @@ func (_c *mockDeleteManager_delete_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockDeleteManager interface { +// newMockDeleteManager creates a new instance of mockDeleteManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDeleteManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockDeleteManager creates a new instance of mockDeleteManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockDeleteManager(t mockConstructorTestingTnewMockDeleteManager) *mockDeleteManager { +}) *mockDeleteManager { mock := &mockDeleteManager{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_ecosystemBackupInterface_test.go b/pkg/backup/mock_ecosystemBackupInterface_test.go index ad787c1..e1c843e 100644 --- a/pkg/backup/mock_ecosystemBackupInterface_test.go +++ b/pkg/backup/mock_ecosystemBackupInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -32,6 +32,10 @@ func (_m *mockEcosystemBackupInterface) EXPECT() *mockEcosystemBackupInterface_E func (_m *mockEcosystemBackupInterface) AddFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemBackupInterface_AddFinalizer_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) AddLabels(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemBackupInterface_AddLabels_Call) RunAndReturn(run func(con func (_m *mockEcosystemBackupInterface) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemBackupInterface_Create_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemBackupInterface_Delete_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemBackupInterface_DeleteCollection_Call) RunAndReturn(run f func (_m *mockEcosystemBackupInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemBackupInterface_Get_Call) RunAndReturn(run func(context.C func (_m *mockEcosystemBackupInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemBackupInterface) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemBackupInterface_Patch_Call) RunAndReturn(run func(context func (_m *mockEcosystemBackupInterface) RemoveFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemBackupInterface_RemoveFinalizer_Call) RunAndReturn(run fu func (_m *mockEcosystemBackupInterface) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemBackupInterface_Update_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatus_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) UpdateStatusCompleted(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusCompleted_Call) RunAndReturn( func (_m *mockEcosystemBackupInterface) UpdateStatusDeleting(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusDeleting_Call) RunAndReturn(r func (_m *mockEcosystemBackupInterface) UpdateStatusFailed(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusFailed_Call) RunAndReturn(run func (_m *mockEcosystemBackupInterface) UpdateStatusInProgress(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusInProgress_Call) RunAndReturn func (_m *mockEcosystemBackupInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockEcosystemBackupInterface_Watch_Call) RunAndReturn(run func(context return _c } -type mockConstructorTestingTnewMockEcosystemBackupInterface interface { +// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemBackupInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemBackupInterface(t mockConstructorTestingTnewMockEcosystemBackupInterface) *mockEcosystemBackupInterface { +}) *mockEcosystemBackupInterface { mock := &mockEcosystemBackupInterface{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_ecosystemInterface_test.go b/pkg/backup/mock_ecosystemInterface_test.go index 0e295c4..181b41e 100644 --- a/pkg/backup/mock_ecosystemInterface_test.go +++ b/pkg/backup/mock_ecosystemInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemInterface) EXPECT() *mockEcosystemInterface_Expecter { func (_m *mockEcosystemInterface) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemInterface) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemInterface) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemInterface) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemInterface_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemInterface) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemInterface_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemInterface) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemInterface_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemInterface) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemInterface) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemInterface) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemInterface) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemInterface_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemInterface) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemInterface) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemInterface_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemInterface) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemInterface_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemInterface) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemInterface_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemInterface) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemInterface_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemInterface_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemInterface_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemInterface_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) CoordinationV1alpha1() *mockEcosystemInterface_CoordinationV1alpha1_Call { + return &mockEcosystemInterface_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemInterface) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemInterface_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemInterface_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemInterface) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemInterface_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemInterface) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemInterface) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemInterface_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemInterface_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemInterface) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemInterface_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemInterface) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemInterface_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemInterface) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemInterface_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemInterface_FlowcontrolV1alpha1_Call struct { +// mockEcosystemInterface_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemInterface_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1alpha1() *mockEcosystemInterface_FlowcontrolV1alpha1_Call { - return &mockEcosystemInterface_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1() *mockEcosystemInterface_FlowcontrolV1_Call { + return &mockEcosystemInterface_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemInterface_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemInterface_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemInterface) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemInterface_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemInterface_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemInterface_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemInterface) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemInterface_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemInterface) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemInterface_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemInterface) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemInterface_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemInterface) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemInterface_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemInterface) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemInterface_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemInterface) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemInterface_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemInterface) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemInterface_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemInterface) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemInterface_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemInterface_ResourceV1alpha2_Call struct { +// mockEcosystemInterface_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemInterface_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha2() *mockEcosystemInterface_ResourceV1alpha2_Call { - return &mockEcosystemInterface_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha3() *mockEcosystemInterface_ResourceV1alpha3_Call { + return &mockEcosystemInterface_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemInterface_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemInterface) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemInterface_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemInterface_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemInterface_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemInterface) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemInterface_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemInterface) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemInterface_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemInterface interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemInterface_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) StoragemigrationV1alpha1() *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + return &mockEcosystemInterface_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemInterface creates a new instance of mockEcosystemInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemInterface(t mockConstructorTestingTnewMockEcosystemInterface) *mockEcosystemInterface { +// The first argument is typically a *testing.T value. +func newMockEcosystemInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemInterface { mock := &mockEcosystemInterface{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_etcdRegistry_test.go b/pkg/backup/mock_etcdRegistry_test.go index 5d93607..1db07cd 100644 --- a/pkg/backup/mock_etcdRegistry_test.go +++ b/pkg/backup/mock_etcdRegistry_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -24,6 +24,10 @@ func (_m *mockEtcdRegistry) EXPECT() *mockEtcdRegistry_Expecter { func (_m *mockEtcdRegistry) BlueprintRegistry() registry.ConfigurationContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BlueprintRegistry") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { r0 = rf() @@ -67,6 +71,10 @@ func (_c *mockEtcdRegistry_BlueprintRegistry_Call) RunAndReturn(run func() regis func (_m *mockEtcdRegistry) DoguConfig(dogu string) registry.ConfigurationContext { ret := _m.Called(dogu) + if len(ret) == 0 { + panic("no return value specified for DoguConfig") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { r0 = rf(dogu) @@ -111,6 +119,10 @@ func (_c *mockEtcdRegistry_DoguConfig_Call) RunAndReturn(run func(string) regist func (_m *mockEtcdRegistry) DoguRegistry() registry.DoguRegistry { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DoguRegistry") + } + var r0 registry.DoguRegistry if rf, ok := ret.Get(0).(func() registry.DoguRegistry); ok { r0 = rf() @@ -154,6 +166,10 @@ func (_c *mockEtcdRegistry_DoguRegistry_Call) RunAndReturn(run func() registry.D func (_m *mockEtcdRegistry) GetNode() (registry.Node, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNode") + } + var r0 registry.Node var r1 error if rf, ok := ret.Get(0).(func() (registry.Node, error)); ok { @@ -205,6 +221,10 @@ func (_c *mockEtcdRegistry_GetNode_Call) RunAndReturn(run func() (registry.Node, func (_m *mockEtcdRegistry) GlobalConfig() registry.ConfigurationContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GlobalConfig") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { r0 = rf() @@ -248,6 +268,10 @@ func (_c *mockEtcdRegistry_GlobalConfig_Call) RunAndReturn(run func() registry.C func (_m *mockEtcdRegistry) HostConfig(hostService string) registry.ConfigurationContext { ret := _m.Called(hostService) + if len(ret) == 0 { + panic("no return value specified for HostConfig") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { r0 = rf(hostService) @@ -292,6 +316,10 @@ func (_c *mockEtcdRegistry_HostConfig_Call) RunAndReturn(run func(string) regist func (_m *mockEtcdRegistry) RootConfig() registry.WatchConfigurationContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RootConfig") + } + var r0 registry.WatchConfigurationContext if rf, ok := ret.Get(0).(func() registry.WatchConfigurationContext); ok { r0 = rf() @@ -335,6 +363,10 @@ func (_c *mockEtcdRegistry_RootConfig_Call) RunAndReturn(run func() registry.Wat func (_m *mockEtcdRegistry) State(dogu string) registry.State { ret := _m.Called(dogu) + if len(ret) == 0 { + panic("no return value specified for State") + } + var r0 registry.State if rf, ok := ret.Get(0).(func(string) registry.State); ok { r0 = rf(dogu) @@ -375,13 +407,12 @@ func (_c *mockEtcdRegistry_State_Call) RunAndReturn(run func(string) registry.St return _c } -type mockConstructorTestingTnewMockEtcdRegistry interface { +// newMockEtcdRegistry creates a new instance of mockEtcdRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEtcdRegistry(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEtcdRegistry creates a new instance of mockEtcdRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEtcdRegistry(t mockConstructorTestingTnewMockEtcdRegistry) *mockEtcdRegistry { +}) *mockEtcdRegistry { mock := &mockEtcdRegistry{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_eventRecorder_test.go b/pkg/backup/mock_eventRecorder_test.go index 5b46424..41891d0 100644 --- a/pkg/backup/mock_eventRecorder_test.go +++ b/pkg/backup/mock_eventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -151,13 +151,12 @@ func (_c *mockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTnewMockEventRecorder interface { +// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEventRecorder(t mockConstructorTestingTnewMockEventRecorder) *mockEventRecorder { +}) *mockEventRecorder { mock := &mockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_requeueHandler_test.go b/pkg/backup/mock_requeueHandler_test.go index 0e0ef60..d1174b5 100644 --- a/pkg/backup/mock_requeueHandler_test.go +++ b/pkg/backup/mock_requeueHandler_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -28,6 +28,10 @@ func (_m *mockRequeueHandler) EXPECT() *mockRequeueHandler_Expecter { func (_m *mockRequeueHandler) Handle(ctx context.Context, contextMessage string, backup v1.RequeuableObject, originalErr error, requeueStatus string) (reconcile.Result, error) { ret := _m.Called(ctx, contextMessage, backup, originalErr, requeueStatus) + if len(ret) == 0 { + panic("no return value specified for Handle") + } + var r0 reconcile.Result var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, v1.RequeuableObject, error, string) (reconcile.Result, error)); ok { @@ -80,13 +84,12 @@ func (_c *mockRequeueHandler_Handle_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockRequeueHandler interface { +// newMockRequeueHandler creates a new instance of mockRequeueHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRequeueHandler(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRequeueHandler creates a new instance of mockRequeueHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRequeueHandler(t mockConstructorTestingTnewMockRequeueHandler) *mockRequeueHandler { +}) *mockRequeueHandler { mock := &mockRequeueHandler{} mock.Mock.Test(t) diff --git a/pkg/backup/mock_statusSyncManager_test.go b/pkg/backup/mock_statusSyncManager_test.go index f7a28cd..35aba7b 100644 --- a/pkg/backup/mock_statusSyncManager_test.go +++ b/pkg/backup/mock_statusSyncManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backup @@ -26,6 +26,10 @@ func (_m *mockStatusSyncManager) EXPECT() *mockStatusSyncManager_Expecter { func (_m *mockStatusSyncManager) syncStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for syncStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -65,13 +69,12 @@ func (_c *mockStatusSyncManager_syncStatus_Call) RunAndReturn(run func(context.C return _c } -type mockConstructorTestingTnewMockStatusSyncManager interface { +// newMockStatusSyncManager creates a new instance of mockStatusSyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockStatusSyncManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockStatusSyncManager creates a new instance of mockStatusSyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockStatusSyncManager(t mockConstructorTestingTnewMockStatusSyncManager) *mockStatusSyncManager { +}) *mockStatusSyncManager { mock := &mockStatusSyncManager{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_Manager_test.go b/pkg/backupschedule/mock_Manager_test.go index 51bd8ff..7c47f38 100644 --- a/pkg/backupschedule/mock_Manager_test.go +++ b/pkg/backupschedule/mock_Manager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -26,6 +26,10 @@ func (_m *MockManager) EXPECT() *MockManager_Expecter { func (_m *MockManager) create(ctx context.Context, backupSchedule *v1.BackupSchedule) error { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) error); ok { r0 = rf(ctx, backupSchedule) @@ -69,6 +73,10 @@ func (_c *MockManager_create_Call) RunAndReturn(run func(context.Context, *v1.Ba func (_m *MockManager) delete(ctx context.Context, backupSchedule *v1.BackupSchedule) error { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) error); ok { r0 = rf(ctx, backupSchedule) @@ -112,6 +120,10 @@ func (_c *MockManager_delete_Call) RunAndReturn(run func(context.Context, *v1.Ba func (_m *MockManager) update(ctx context.Context, backupSchedule *v1.BackupSchedule) error { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) error); ok { r0 = rf(ctx, backupSchedule) @@ -151,13 +163,12 @@ func (_c *MockManager_update_Call) RunAndReturn(run func(context.Context, *v1.Ba return _c } -type mockConstructorTestingTNewMockManager interface { +// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager { +}) *MockManager { mock := &MockManager{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_batchV1Interface_test.go b/pkg/backupschedule/mock_batchV1Interface_test.go index bd90a02..1594739 100644 --- a/pkg/backupschedule/mock_batchV1Interface_test.go +++ b/pkg/backupschedule/mock_batchV1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -26,6 +26,10 @@ func (_m *mockBatchV1Interface) EXPECT() *mockBatchV1Interface_Expecter { func (_m *mockBatchV1Interface) CronJobs(namespace string) v1.CronJobInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for CronJobs") + } + var r0 v1.CronJobInterface if rf, ok := ret.Get(0).(func(string) v1.CronJobInterface); ok { r0 = rf(namespace) @@ -70,6 +74,10 @@ func (_c *mockBatchV1Interface_CronJobs_Call) RunAndReturn(run func(string) v1.C func (_m *mockBatchV1Interface) Jobs(namespace string) v1.JobInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Jobs") + } + var r0 v1.JobInterface if rf, ok := ret.Get(0).(func(string) v1.JobInterface); ok { r0 = rf(namespace) @@ -114,6 +122,10 @@ func (_c *mockBatchV1Interface_Jobs_Call) RunAndReturn(run func(string) v1.JobIn func (_m *mockBatchV1Interface) RESTClient() rest.Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + var r0 rest.Interface if rf, ok := ret.Get(0).(func() rest.Interface); ok { r0 = rf() @@ -153,13 +165,12 @@ func (_c *mockBatchV1Interface_RESTClient_Call) RunAndReturn(run func() rest.Int return _c } -type mockConstructorTestingTnewMockBatchV1Interface interface { +// newMockBatchV1Interface creates a new instance of mockBatchV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBatchV1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBatchV1Interface creates a new instance of mockBatchV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBatchV1Interface(t mockConstructorTestingTnewMockBatchV1Interface) *mockBatchV1Interface { +}) *mockBatchV1Interface { mock := &mockBatchV1Interface{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_controllerManager_test.go b/pkg/backupschedule/mock_controllerManager_test.go index b19c859..d22aa5c 100644 --- a/pkg/backupschedule/mock_controllerManager_test.go +++ b/pkg/backupschedule/mock_controllerManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -48,6 +48,10 @@ func (_m *mockControllerManager) EXPECT() *mockControllerManager_Expecter { func (_m *mockControllerManager) Add(_a0 manager.Runnable) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 error if rf, ok := ret.Get(0).(func(manager.Runnable) error); ok { r0 = rf(_a0) @@ -90,6 +94,10 @@ func (_c *mockControllerManager_Add_Call) RunAndReturn(run func(manager.Runnable func (_m *mockControllerManager) AddHealthzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddHealthzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -129,10 +137,61 @@ func (_c *mockControllerManager_AddHealthzCheck_Call) RunAndReturn(run func(stri return _c } +// AddMetricsServerExtraHandler provides a mock function with given fields: path, handler +func (_m *mockControllerManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error { + ret := _m.Called(path, handler) + + if len(ret) == 0 { + panic("no return value specified for AddMetricsServerExtraHandler") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, http.Handler) error); ok { + r0 = rf(path, handler) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_AddMetricsServerExtraHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMetricsServerExtraHandler' +type mockControllerManager_AddMetricsServerExtraHandler_Call struct { + *mock.Call +} + +// AddMetricsServerExtraHandler is a helper method to define mock.On call +// - path string +// - handler http.Handler +func (_e *mockControllerManager_Expecter) AddMetricsServerExtraHandler(path interface{}, handler interface{}) *mockControllerManager_AddMetricsServerExtraHandler_Call { + return &mockControllerManager_AddMetricsServerExtraHandler_Call{Call: _e.mock.On("AddMetricsServerExtraHandler", path, handler)} +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Run(run func(path string, handler http.Handler)) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(http.Handler)) + }) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Return(_a0 error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) RunAndReturn(run func(string, http.Handler) error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(run) + return _c +} + // AddReadyzCheck provides a mock function with given fields: name, check func (_m *mockControllerManager) AddReadyzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddReadyzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -176,6 +235,10 @@ func (_c *mockControllerManager_AddReadyzCheck_Call) RunAndReturn(run func(strin func (_m *mockControllerManager) Elected() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Elected") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -219,6 +282,10 @@ func (_c *mockControllerManager_Elected_Call) RunAndReturn(run func() <-chan str func (_m *mockControllerManager) GetAPIReader() client.Reader { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAPIReader") + } + var r0 client.Reader if rf, ok := ret.Get(0).(func() client.Reader); ok { r0 = rf() @@ -262,6 +329,10 @@ func (_c *mockControllerManager_GetAPIReader_Call) RunAndReturn(run func() clien func (_m *mockControllerManager) GetCache() cache.Cache { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCache") + } + var r0 cache.Cache if rf, ok := ret.Get(0).(func() cache.Cache); ok { r0 = rf() @@ -305,6 +376,10 @@ func (_c *mockControllerManager_GetCache_Call) RunAndReturn(run func() cache.Cac func (_m *mockControllerManager) GetClient() client.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetClient") + } + var r0 client.Client if rf, ok := ret.Get(0).(func() client.Client); ok { r0 = rf() @@ -348,6 +423,10 @@ func (_c *mockControllerManager_GetClient_Call) RunAndReturn(run func() client.C func (_m *mockControllerManager) GetConfig() *rest.Config { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetConfig") + } + var r0 *rest.Config if rf, ok := ret.Get(0).(func() *rest.Config); ok { r0 = rf() @@ -391,6 +470,10 @@ func (_c *mockControllerManager_GetConfig_Call) RunAndReturn(run func() *rest.Co func (_m *mockControllerManager) GetControllerOptions() config.Controller { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetControllerOptions") + } + var r0 config.Controller if rf, ok := ret.Get(0).(func() config.Controller); ok { r0 = rf() @@ -432,6 +515,10 @@ func (_c *mockControllerManager_GetControllerOptions_Call) RunAndReturn(run func func (_m *mockControllerManager) GetEventRecorderFor(name string) record.EventRecorder { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for GetEventRecorderFor") + } + var r0 record.EventRecorder if rf, ok := ret.Get(0).(func(string) record.EventRecorder); ok { r0 = rf(name) @@ -476,6 +563,10 @@ func (_c *mockControllerManager_GetEventRecorderFor_Call) RunAndReturn(run func( func (_m *mockControllerManager) GetFieldIndexer() client.FieldIndexer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFieldIndexer") + } + var r0 client.FieldIndexer if rf, ok := ret.Get(0).(func() client.FieldIndexer); ok { r0 = rf() @@ -519,6 +610,10 @@ func (_c *mockControllerManager_GetFieldIndexer_Call) RunAndReturn(run func() cl func (_m *mockControllerManager) GetHTTPClient() *http.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHTTPClient") + } + var r0 *http.Client if rf, ok := ret.Get(0).(func() *http.Client); ok { r0 = rf() @@ -562,6 +657,10 @@ func (_c *mockControllerManager_GetHTTPClient_Call) RunAndReturn(run func() *htt func (_m *mockControllerManager) GetLogger() logr.Logger { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLogger") + } + var r0 logr.Logger if rf, ok := ret.Get(0).(func() logr.Logger); ok { r0 = rf() @@ -603,6 +702,10 @@ func (_c *mockControllerManager_GetLogger_Call) RunAndReturn(run func() logr.Log func (_m *mockControllerManager) GetRESTMapper() meta.RESTMapper { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRESTMapper") + } + var r0 meta.RESTMapper if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { r0 = rf() @@ -646,6 +749,10 @@ func (_c *mockControllerManager_GetRESTMapper_Call) RunAndReturn(run func() meta func (_m *mockControllerManager) GetScheme() *runtime.Scheme { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetScheme") + } + var r0 *runtime.Scheme if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { r0 = rf() @@ -689,6 +796,10 @@ func (_c *mockControllerManager_GetScheme_Call) RunAndReturn(run func() *runtime func (_m *mockControllerManager) GetWebhookServer() webhook.Server { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetWebhookServer") + } + var r0 webhook.Server if rf, ok := ret.Get(0).(func() webhook.Server); ok { r0 = rf() @@ -732,6 +843,10 @@ func (_c *mockControllerManager_GetWebhookServer_Call) RunAndReturn(run func() w func (_m *mockControllerManager) Start(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -770,13 +885,12 @@ func (_c *mockControllerManager_Start_Call) RunAndReturn(run func(context.Contex return _c } -type mockConstructorTestingTnewMockControllerManager interface { +// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockControllerManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockControllerManager(t mockConstructorTestingTnewMockControllerManager) *mockControllerManager { +}) *mockControllerManager { mock := &mockControllerManager{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_createManager_test.go b/pkg/backupschedule/mock_createManager_test.go index 9d1fca1..7b497ed 100644 --- a/pkg/backupschedule/mock_createManager_test.go +++ b/pkg/backupschedule/mock_createManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -26,6 +26,10 @@ func (_m *mockCreateManager) EXPECT() *mockCreateManager_Expecter { func (_m *mockCreateManager) create(ctx context.Context, backupSchedule *v1.BackupSchedule) error { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) error); ok { r0 = rf(ctx, backupSchedule) @@ -65,13 +69,12 @@ func (_c *mockCreateManager_create_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockCreateManager interface { +// newMockCreateManager creates a new instance of mockCreateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCreateManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCreateManager creates a new instance of mockCreateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCreateManager(t mockConstructorTestingTnewMockCreateManager) *mockCreateManager { +}) *mockCreateManager { mock := &mockCreateManager{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_cronJobInterface_test.go b/pkg/backupschedule/mock_cronJobInterface_test.go index 25ec19d..98a614e 100644 --- a/pkg/backupschedule/mock_cronJobInterface_test.go +++ b/pkg/backupschedule/mock_cronJobInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -35,6 +35,10 @@ func (_m *mockCronJobInterface) EXPECT() *mockCronJobInterface_Expecter { func (_m *mockCronJobInterface) Apply(ctx context.Context, cronJob *v1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for Apply") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.CronJobApplyConfiguration, metav1.ApplyOptions) (*batchv1.CronJob, error)); ok { @@ -91,6 +95,10 @@ func (_c *mockCronJobInterface_Apply_Call) RunAndReturn(run func(context.Context func (_m *mockCronJobInterface) ApplyStatus(ctx context.Context, cronJob *v1.CronJobApplyConfiguration, opts metav1.ApplyOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyStatus") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.CronJobApplyConfiguration, metav1.ApplyOptions) (*batchv1.CronJob, error)); ok { @@ -147,6 +155,10 @@ func (_c *mockCronJobInterface_ApplyStatus_Call) RunAndReturn(run func(context.C func (_m *mockCronJobInterface) Create(ctx context.Context, cronJob *batchv1.CronJob, opts metav1.CreateOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *batchv1.CronJob, metav1.CreateOptions) (*batchv1.CronJob, error)); ok { @@ -203,6 +215,10 @@ func (_c *mockCronJobInterface_Create_Call) RunAndReturn(run func(context.Contex func (_m *mockCronJobInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -247,6 +263,10 @@ func (_c *mockCronJobInterface_Delete_Call) RunAndReturn(run func(context.Contex func (_m *mockCronJobInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -291,6 +311,10 @@ func (_c *mockCronJobInterface_DeleteCollection_Call) RunAndReturn(run func(cont func (_m *mockCronJobInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*batchv1.CronJob, error)); ok { @@ -347,6 +371,10 @@ func (_c *mockCronJobInterface_Get_Call) RunAndReturn(run func(context.Context, func (_m *mockCronJobInterface) List(ctx context.Context, opts metav1.ListOptions) (*batchv1.CronJobList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *batchv1.CronJobList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*batchv1.CronJobList, error)); ok { @@ -409,6 +437,10 @@ func (_m *mockCronJobInterface) Patch(ctx context.Context, name string, pt types _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*batchv1.CronJob, error)); ok { @@ -475,6 +507,10 @@ func (_c *mockCronJobInterface_Patch_Call) RunAndReturn(run func(context.Context func (_m *mockCronJobInterface) Update(ctx context.Context, cronJob *batchv1.CronJob, opts metav1.UpdateOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *batchv1.CronJob, metav1.UpdateOptions) (*batchv1.CronJob, error)); ok { @@ -531,6 +567,10 @@ func (_c *mockCronJobInterface_Update_Call) RunAndReturn(run func(context.Contex func (_m *mockCronJobInterface) UpdateStatus(ctx context.Context, cronJob *batchv1.CronJob, opts metav1.UpdateOptions) (*batchv1.CronJob, error) { ret := _m.Called(ctx, cronJob, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *batchv1.CronJob var r1 error if rf, ok := ret.Get(0).(func(context.Context, *batchv1.CronJob, metav1.UpdateOptions) (*batchv1.CronJob, error)); ok { @@ -587,6 +627,10 @@ func (_c *mockCronJobInterface_UpdateStatus_Call) RunAndReturn(run func(context. func (_m *mockCronJobInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -638,13 +682,12 @@ func (_c *mockCronJobInterface_Watch_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTnewMockCronJobInterface interface { +// newMockCronJobInterface creates a new instance of mockCronJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCronJobInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCronJobInterface creates a new instance of mockCronJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCronJobInterface(t mockConstructorTestingTnewMockCronJobInterface) *mockCronJobInterface { +}) *mockCronJobInterface { mock := &mockCronJobInterface{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_deleteManager_test.go b/pkg/backupschedule/mock_deleteManager_test.go index ef19ec7..2e18475 100644 --- a/pkg/backupschedule/mock_deleteManager_test.go +++ b/pkg/backupschedule/mock_deleteManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -26,6 +26,10 @@ func (_m *mockDeleteManager) EXPECT() *mockDeleteManager_Expecter { func (_m *mockDeleteManager) delete(ctx context.Context, backupSchedule *v1.BackupSchedule) error { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) error); ok { r0 = rf(ctx, backupSchedule) @@ -65,13 +69,12 @@ func (_c *mockDeleteManager_delete_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockDeleteManager interface { +// newMockDeleteManager creates a new instance of mockDeleteManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDeleteManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockDeleteManager creates a new instance of mockDeleteManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockDeleteManager(t mockConstructorTestingTnewMockDeleteManager) *mockDeleteManager { +}) *mockDeleteManager { mock := &mockDeleteManager{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_ecosystemBackupScheduleInterface_test.go b/pkg/backupschedule/mock_ecosystemBackupScheduleInterface_test.go index 4e0459d..a1d73e4 100644 --- a/pkg/backupschedule/mock_ecosystemBackupScheduleInterface_test.go +++ b/pkg/backupschedule/mock_ecosystemBackupScheduleInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -32,6 +32,10 @@ func (_m *mockEcosystemBackupScheduleInterface) EXPECT() *mockEcosystemBackupSch func (_m *mockEcosystemBackupScheduleInterface) AddFinalizer(ctx context.Context, backupSchedule *v1.BackupSchedule, finalizer string) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, string) (*v1.BackupSchedule, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemBackupScheduleInterface_AddFinalizer_Call) RunAndReturn(r func (_m *mockEcosystemBackupScheduleInterface) AddLabels(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemBackupScheduleInterface_AddLabels_Call) RunAndReturn(run func (_m *mockEcosystemBackupScheduleInterface) Create(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.CreateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.CreateOptions) (*v1.BackupSchedule, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemBackupScheduleInterface_Create_Call) RunAndReturn(run fun func (_m *mockEcosystemBackupScheduleInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemBackupScheduleInterface_Delete_Call) RunAndReturn(run fun func (_m *mockEcosystemBackupScheduleInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemBackupScheduleInterface_DeleteCollection_Call) RunAndRetu func (_m *mockEcosystemBackupScheduleInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.BackupSchedule, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemBackupScheduleInterface_Get_Call) RunAndReturn(run func(c func (_m *mockEcosystemBackupScheduleInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupScheduleList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupScheduleList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupScheduleList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemBackupScheduleInterface) Patch(ctx context.Context, name _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.BackupSchedule, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemBackupScheduleInterface_Patch_Call) RunAndReturn(run func func (_m *mockEcosystemBackupScheduleInterface) RemoveFinalizer(ctx context.Context, backupSchedule *v1.BackupSchedule, finalizer string) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, string) (*v1.BackupSchedule, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemBackupScheduleInterface_RemoveFinalizer_Call) RunAndRetur func (_m *mockEcosystemBackupScheduleInterface) Update(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.UpdateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.UpdateOptions) (*v1.BackupSchedule, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemBackupScheduleInterface_Update_Call) RunAndReturn(run fun func (_m *mockEcosystemBackupScheduleInterface) UpdateStatus(ctx context.Context, backupSchedule *v1.BackupSchedule, opts metav1.UpdateOptions) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule, metav1.UpdateOptions) (*v1.BackupSchedule, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemBackupScheduleInterface_UpdateStatus_Call) RunAndReturn(r func (_m *mockEcosystemBackupScheduleInterface) UpdateStatusCreated(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCreated") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemBackupScheduleInterface_UpdateStatusCreated_Call) RunAndR func (_m *mockEcosystemBackupScheduleInterface) UpdateStatusCreating(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCreating") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemBackupScheduleInterface_UpdateStatusCreating_Call) RunAnd func (_m *mockEcosystemBackupScheduleInterface) UpdateStatusDeleting(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemBackupScheduleInterface_UpdateStatusDeleting_Call) RunAnd func (_m *mockEcosystemBackupScheduleInterface) UpdateStatusFailed(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemBackupScheduleInterface_UpdateStatusFailed_Call) RunAndRe func (_m *mockEcosystemBackupScheduleInterface) UpdateStatusUpdating(ctx context.Context, backupSchedule *v1.BackupSchedule) (*v1.BackupSchedule, error) { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusUpdating") + } + var r0 *v1.BackupSchedule var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) (*v1.BackupSchedule, error)); ok { @@ -914,6 +978,10 @@ func (_c *mockEcosystemBackupScheduleInterface_UpdateStatusUpdating_Call) RunAnd func (_m *mockEcosystemBackupScheduleInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -965,13 +1033,12 @@ func (_c *mockEcosystemBackupScheduleInterface_Watch_Call) RunAndReturn(run func return _c } -type mockConstructorTestingTnewMockEcosystemBackupScheduleInterface interface { +// newMockEcosystemBackupScheduleInterface creates a new instance of mockEcosystemBackupScheduleInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemBackupScheduleInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemBackupScheduleInterface creates a new instance of mockEcosystemBackupScheduleInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemBackupScheduleInterface(t mockConstructorTestingTnewMockEcosystemBackupScheduleInterface) *mockEcosystemBackupScheduleInterface { +}) *mockEcosystemBackupScheduleInterface { mock := &mockEcosystemBackupScheduleInterface{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_ecosystemInterface_test.go b/pkg/backupschedule/mock_ecosystemInterface_test.go index d694fe1..eb34c5f 100644 --- a/pkg/backupschedule/mock_ecosystemInterface_test.go +++ b/pkg/backupschedule/mock_ecosystemInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemInterface) EXPECT() *mockEcosystemInterface_Expecter { func (_m *mockEcosystemInterface) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemInterface) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemInterface) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemInterface) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemInterface_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemInterface) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemInterface_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemInterface) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemInterface_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemInterface) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemInterface) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemInterface) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemInterface) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemInterface_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemInterface) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemInterface) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemInterface_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemInterface) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemInterface_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemInterface) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemInterface_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemInterface) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemInterface_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemInterface_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemInterface_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemInterface_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) CoordinationV1alpha1() *mockEcosystemInterface_CoordinationV1alpha1_Call { + return &mockEcosystemInterface_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemInterface) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemInterface_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemInterface_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemInterface) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemInterface_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemInterface) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemInterface) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemInterface_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemInterface_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemInterface) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemInterface_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemInterface) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemInterface_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemInterface) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemInterface_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemInterface_FlowcontrolV1alpha1_Call struct { +// mockEcosystemInterface_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemInterface_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1alpha1() *mockEcosystemInterface_FlowcontrolV1alpha1_Call { - return &mockEcosystemInterface_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1() *mockEcosystemInterface_FlowcontrolV1_Call { + return &mockEcosystemInterface_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemInterface_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemInterface_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemInterface) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemInterface_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemInterface_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemInterface_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemInterface) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemInterface_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemInterface) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemInterface_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemInterface) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemInterface_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemInterface) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemInterface_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemInterface) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemInterface_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemInterface) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemInterface_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemInterface) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemInterface_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemInterface) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemInterface_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemInterface_ResourceV1alpha2_Call struct { +// mockEcosystemInterface_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemInterface_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha2() *mockEcosystemInterface_ResourceV1alpha2_Call { - return &mockEcosystemInterface_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha3() *mockEcosystemInterface_ResourceV1alpha3_Call { + return &mockEcosystemInterface_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemInterface_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemInterface) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemInterface_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemInterface_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemInterface_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemInterface) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemInterface_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemInterface) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemInterface_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemInterface interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemInterface_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) StoragemigrationV1alpha1() *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + return &mockEcosystemInterface_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemInterface creates a new instance of mockEcosystemInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemInterface(t mockConstructorTestingTnewMockEcosystemInterface) *mockEcosystemInterface { +// The first argument is typically a *testing.T value. +func newMockEcosystemInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemInterface { mock := &mockEcosystemInterface{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_ecosystemV1Alpha1Interface_test.go b/pkg/backupschedule/mock_ecosystemV1Alpha1Interface_test.go index e01d2a2..2265372 100644 --- a/pkg/backupschedule/mock_ecosystemV1Alpha1Interface_test.go +++ b/pkg/backupschedule/mock_ecosystemV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -24,6 +24,10 @@ func (_m *mockEcosystemV1Alpha1Interface) EXPECT() *mockEcosystemV1Alpha1Interfa func (_m *mockEcosystemV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockEcosystemV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run func (_m *mockEcosystemV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockEcosystemV1Alpha1Interface_Backups_Call) RunAndReturn(run func(str func (_m *mockEcosystemV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockEcosystemV1Alpha1Interface_Restores_Call) RunAndReturn(run func(st return _c } -type mockConstructorTestingTnewMockEcosystemV1Alpha1Interface interface { +// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemV1Alpha1Interface(t mockConstructorTestingTnewMockEcosystemV1Alpha1Interface) *mockEcosystemV1Alpha1Interface { +}) *mockEcosystemV1Alpha1Interface { mock := &mockEcosystemV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_eventRecorder_test.go b/pkg/backupschedule/mock_eventRecorder_test.go index b62bf90..08693ca 100644 --- a/pkg/backupschedule/mock_eventRecorder_test.go +++ b/pkg/backupschedule/mock_eventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -151,13 +151,12 @@ func (_c *mockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTnewMockEventRecorder interface { +// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEventRecorder(t mockConstructorTestingTnewMockEventRecorder) *mockEventRecorder { +}) *mockEventRecorder { mock := &mockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_requeueHandler_test.go b/pkg/backupschedule/mock_requeueHandler_test.go index d0215f4..e09e232 100644 --- a/pkg/backupschedule/mock_requeueHandler_test.go +++ b/pkg/backupschedule/mock_requeueHandler_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -28,6 +28,10 @@ func (_m *mockRequeueHandler) EXPECT() *mockRequeueHandler_Expecter { func (_m *mockRequeueHandler) Handle(ctx context.Context, contextMessage string, backupSchedule v1.RequeuableObject, originalErr error, requeueStatus string) (reconcile.Result, error) { ret := _m.Called(ctx, contextMessage, backupSchedule, originalErr, requeueStatus) + if len(ret) == 0 { + panic("no return value specified for Handle") + } + var r0 reconcile.Result var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, v1.RequeuableObject, error, string) (reconcile.Result, error)); ok { @@ -80,13 +84,12 @@ func (_c *mockRequeueHandler_Handle_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockRequeueHandler interface { +// newMockRequeueHandler creates a new instance of mockRequeueHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRequeueHandler(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRequeueHandler creates a new instance of mockRequeueHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRequeueHandler(t mockConstructorTestingTnewMockRequeueHandler) *mockRequeueHandler { +}) *mockRequeueHandler { mock := &mockRequeueHandler{} mock.Mock.Test(t) diff --git a/pkg/backupschedule/mock_updateManager_test.go b/pkg/backupschedule/mock_updateManager_test.go index 704e56b..babc1ad 100644 --- a/pkg/backupschedule/mock_updateManager_test.go +++ b/pkg/backupschedule/mock_updateManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package backupschedule @@ -26,6 +26,10 @@ func (_m *mockUpdateManager) EXPECT() *mockUpdateManager_Expecter { func (_m *mockUpdateManager) update(ctx context.Context, backupSchedule *v1.BackupSchedule) error { ret := _m.Called(ctx, backupSchedule) + if len(ret) == 0 { + panic("no return value specified for update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupSchedule) error); ok { r0 = rf(ctx, backupSchedule) @@ -65,13 +69,12 @@ func (_c *mockUpdateManager_update_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockUpdateManager interface { +// newMockUpdateManager creates a new instance of mockUpdateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockUpdateManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockUpdateManager creates a new instance of mockUpdateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockUpdateManager(t mockConstructorTestingTnewMockUpdateManager) *mockUpdateManager { +}) *mockUpdateManager { mock := &mockUpdateManager{} mock.Mock.Test(t) diff --git a/pkg/cleanup/mock_Manager_test.go b/pkg/cleanup/mock_Manager_test.go index f5c43d9..f181d17 100644 --- a/pkg/cleanup/mock_Manager_test.go +++ b/pkg/cleanup/mock_Manager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package cleanup @@ -25,6 +25,10 @@ func (_m *MockManager) EXPECT() *MockManager_Expecter { func (_m *MockManager) Cleanup(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Cleanup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -63,13 +67,12 @@ func (_c *MockManager_Cleanup_Call) RunAndReturn(run func(context.Context) error return _c } -type mockConstructorTestingTNewMockManager interface { +// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager { +}) *MockManager { mock := &MockManager{} mock.Mock.Test(t) diff --git a/pkg/cleanup/mock_discoveryInterface_test.go b/pkg/cleanup/mock_discoveryInterface_test.go index f761e00..360a3bf 100644 --- a/pkg/cleanup/mock_discoveryInterface_test.go +++ b/pkg/cleanup/mock_discoveryInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package cleanup @@ -34,6 +34,10 @@ func (_m *mockDiscoveryInterface) EXPECT() *mockDiscoveryInterface_Expecter { func (_m *mockDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OpenAPISchema") + } + var r0 *openapi_v2.Document var r1 error if rf, ok := ret.Get(0).(func() (*openapi_v2.Document, error)); ok { @@ -87,6 +91,10 @@ func (_c *mockDiscoveryInterface_OpenAPISchema_Call) RunAndReturn(run func() (*o func (_m *mockDiscoveryInterface) OpenAPIV3() openapi.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OpenAPIV3") + } + var r0 openapi.Client if rf, ok := ret.Get(0).(func() openapi.Client); ok { r0 = rf() @@ -130,6 +138,10 @@ func (_c *mockDiscoveryInterface_OpenAPIV3_Call) RunAndReturn(run func() openapi func (_m *mockDiscoveryInterface) RESTClient() rest.Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + var r0 rest.Interface if rf, ok := ret.Get(0).(func() rest.Interface); ok { r0 = rf() @@ -173,6 +185,10 @@ func (_c *mockDiscoveryInterface_RESTClient_Call) RunAndReturn(run func() rest.I func (_m *mockDiscoveryInterface) ServerGroups() (*v1.APIGroupList, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServerGroups") + } + var r0 *v1.APIGroupList var r1 error if rf, ok := ret.Get(0).(func() (*v1.APIGroupList, error)); ok { @@ -226,6 +242,10 @@ func (_c *mockDiscoveryInterface_ServerGroups_Call) RunAndReturn(run func() (*v1 func (_m *mockDiscoveryInterface) ServerGroupsAndResources() ([]*v1.APIGroup, []*v1.APIResourceList, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServerGroupsAndResources") + } + var r0 []*v1.APIGroup var r1 []*v1.APIResourceList var r2 error @@ -288,6 +308,10 @@ func (_c *mockDiscoveryInterface_ServerGroupsAndResources_Call) RunAndReturn(run func (_m *mockDiscoveryInterface) ServerPreferredNamespacedResources() ([]*v1.APIResourceList, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServerPreferredNamespacedResources") + } + var r0 []*v1.APIResourceList var r1 error if rf, ok := ret.Get(0).(func() ([]*v1.APIResourceList, error)); ok { @@ -341,6 +365,10 @@ func (_c *mockDiscoveryInterface_ServerPreferredNamespacedResources_Call) RunAnd func (_m *mockDiscoveryInterface) ServerPreferredResources() ([]*v1.APIResourceList, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServerPreferredResources") + } + var r0 []*v1.APIResourceList var r1 error if rf, ok := ret.Get(0).(func() ([]*v1.APIResourceList, error)); ok { @@ -394,6 +422,10 @@ func (_c *mockDiscoveryInterface_ServerPreferredResources_Call) RunAndReturn(run func (_m *mockDiscoveryInterface) ServerResourcesForGroupVersion(groupVersion string) (*v1.APIResourceList, error) { ret := _m.Called(groupVersion) + if len(ret) == 0 { + panic("no return value specified for ServerResourcesForGroupVersion") + } + var r0 *v1.APIResourceList var r1 error if rf, ok := ret.Get(0).(func(string) (*v1.APIResourceList, error)); ok { @@ -448,6 +480,10 @@ func (_c *mockDiscoveryInterface_ServerResourcesForGroupVersion_Call) RunAndRetu func (_m *mockDiscoveryInterface) ServerVersion() (*version.Info, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServerVersion") + } + var r0 *version.Info var r1 error if rf, ok := ret.Get(0).(func() (*version.Info, error)); ok { @@ -501,6 +537,10 @@ func (_c *mockDiscoveryInterface_ServerVersion_Call) RunAndReturn(run func() (*v func (_m *mockDiscoveryInterface) WithLegacy() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for WithLegacy") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -540,13 +580,12 @@ func (_c *mockDiscoveryInterface_WithLegacy_Call) RunAndReturn(run func() discov return _c } -type mockConstructorTestingTnewMockDiscoveryInterface interface { +// newMockDiscoveryInterface creates a new instance of mockDiscoveryInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDiscoveryInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockDiscoveryInterface creates a new instance of mockDiscoveryInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockDiscoveryInterface(t mockConstructorTestingTnewMockDiscoveryInterface) *mockDiscoveryInterface { +}) *mockDiscoveryInterface { mock := &mockDiscoveryInterface{} mock.Mock.Test(t) diff --git a/pkg/cleanup/mock_k8sClient_test.go b/pkg/cleanup/mock_k8sClient_test.go index dea7f71..e5401ba 100644 --- a/pkg/cleanup/mock_k8sClient_test.go +++ b/pkg/cleanup/mock_k8sClient_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package cleanup @@ -42,6 +42,10 @@ func (_m *mockK8sClient) Create(ctx context.Context, obj client.Object, opts ... _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, ...client.CreateOption) error); ok { r0 = rf(ctx, obj, opts...) @@ -100,6 +104,10 @@ func (_m *mockK8sClient) Delete(ctx context.Context, obj client.Object, opts ... _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, ...client.DeleteOption) error); ok { r0 = rf(ctx, obj, opts...) @@ -158,6 +166,10 @@ func (_m *mockK8sClient) DeleteAllOf(ctx context.Context, obj client.Object, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteAllOf") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, ...client.DeleteAllOfOption) error); ok { r0 = rf(ctx, obj, opts...) @@ -216,6 +228,10 @@ func (_m *mockK8sClient) Get(ctx context.Context, key types.NamespacedName, obj _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName, client.Object, ...client.GetOption) error); ok { r0 = rf(ctx, key, obj, opts...) @@ -268,6 +284,10 @@ func (_c *mockK8sClient_Get_Call) RunAndReturn(run func(context.Context, types.N func (_m *mockK8sClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) { ret := _m.Called(obj) + if len(ret) == 0 { + panic("no return value specified for GroupVersionKindFor") + } + var r0 schema.GroupVersionKind var r1 error if rf, ok := ret.Get(0).(func(runtime.Object) (schema.GroupVersionKind, error)); ok { @@ -320,6 +340,10 @@ func (_c *mockK8sClient_GroupVersionKindFor_Call) RunAndReturn(run func(runtime. func (_m *mockK8sClient) IsObjectNamespaced(obj runtime.Object) (bool, error) { ret := _m.Called(obj) + if len(ret) == 0 { + panic("no return value specified for IsObjectNamespaced") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(runtime.Object) (bool, error)); ok { @@ -379,6 +403,10 @@ func (_m *mockK8sClient) List(ctx context.Context, list client.ObjectList, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.ObjectList, ...client.ListOption) error); ok { r0 = rf(ctx, list, opts...) @@ -437,6 +465,10 @@ func (_m *mockK8sClient) Patch(ctx context.Context, obj client.Object, patch cli _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, client.Patch, ...client.PatchOption) error); ok { r0 = rf(ctx, obj, patch, opts...) @@ -489,6 +521,10 @@ func (_c *mockK8sClient_Patch_Call) RunAndReturn(run func(context.Context, clien func (_m *mockK8sClient) RESTMapper() meta.RESTMapper { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTMapper") + } + var r0 meta.RESTMapper if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { r0 = rf() @@ -532,6 +568,10 @@ func (_c *mockK8sClient_RESTMapper_Call) RunAndReturn(run func() meta.RESTMapper func (_m *mockK8sClient) Scheme() *runtime.Scheme { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Scheme") + } + var r0 *runtime.Scheme if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { r0 = rf() @@ -575,6 +615,10 @@ func (_c *mockK8sClient_Scheme_Call) RunAndReturn(run func() *runtime.Scheme) *m func (_m *mockK8sClient) Status() client.SubResourceWriter { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 client.SubResourceWriter if rf, ok := ret.Get(0).(func() client.SubResourceWriter); ok { r0 = rf() @@ -618,6 +662,10 @@ func (_c *mockK8sClient_Status_Call) RunAndReturn(run func() client.SubResourceW func (_m *mockK8sClient) SubResource(subResource string) client.SubResourceClient { ret := _m.Called(subResource) + if len(ret) == 0 { + panic("no return value specified for SubResource") + } + var r0 client.SubResourceClient if rf, ok := ret.Get(0).(func(string) client.SubResourceClient); ok { r0 = rf(subResource) @@ -669,6 +717,10 @@ func (_m *mockK8sClient) Update(ctx context.Context, obj client.Object, opts ... _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.Object, ...client.UpdateOption) error); ok { r0 = rf(ctx, obj, opts...) @@ -716,13 +768,12 @@ func (_c *mockK8sClient_Update_Call) RunAndReturn(run func(context.Context, clie return _c } -type mockConstructorTestingTnewMockK8sClient interface { +// newMockK8sClient creates a new instance of mockK8sClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockK8sClient(t interface { mock.TestingT Cleanup(func()) -} - -// newMockK8sClient creates a new instance of mockK8sClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockK8sClient(t mockConstructorTestingTnewMockK8sClient) *mockK8sClient { +}) *mockK8sClient { mock := &mockK8sClient{} mock.Mock.Test(t) diff --git a/pkg/garbagecollection/mock_Manager_test.go b/pkg/garbagecollection/mock_Manager_test.go index 1868275..94274e9 100644 --- a/pkg/garbagecollection/mock_Manager_test.go +++ b/pkg/garbagecollection/mock_Manager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package garbagecollection @@ -25,6 +25,10 @@ func (_m *MockManager) EXPECT() *MockManager_Expecter { func (_m *MockManager) CollectGarbage(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CollectGarbage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -63,13 +67,12 @@ func (_c *MockManager_CollectGarbage_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTNewMockManager interface { +// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager { +}) *MockManager { mock := &MockManager{} mock.Mock.Test(t) diff --git a/pkg/garbagecollection/mock_backupClient_test.go b/pkg/garbagecollection/mock_backupClient_test.go index 4506f68..472591b 100644 --- a/pkg/garbagecollection/mock_backupClient_test.go +++ b/pkg/garbagecollection/mock_backupClient_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package garbagecollection @@ -32,6 +32,10 @@ func (_m *mockBackupClient) EXPECT() *mockBackupClient_Expecter { func (_m *mockBackupClient) AddFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockBackupClient_AddFinalizer_Call) RunAndReturn(run func(context.Cont func (_m *mockBackupClient) AddLabels(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockBackupClient_AddLabels_Call) RunAndReturn(run func(context.Context func (_m *mockBackupClient) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockBackupClient_Create_Call) RunAndReturn(run func(context.Context, * func (_m *mockBackupClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockBackupClient_Delete_Call) RunAndReturn(run func(context.Context, s func (_m *mockBackupClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockBackupClient_DeleteCollection_Call) RunAndReturn(run func(context. func (_m *mockBackupClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockBackupClient_Get_Call) RunAndReturn(run func(context.Context, stri func (_m *mockBackupClient) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockBackupClient) Patch(ctx context.Context, name string, pt types.Pat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockBackupClient_Patch_Call) RunAndReturn(run func(context.Context, st func (_m *mockBackupClient) RemoveFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockBackupClient_RemoveFinalizer_Call) RunAndReturn(run func(context.C func (_m *mockBackupClient) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockBackupClient_Update_Call) RunAndReturn(run func(context.Context, * func (_m *mockBackupClient) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockBackupClient_UpdateStatus_Call) RunAndReturn(run func(context.Cont func (_m *mockBackupClient) UpdateStatusCompleted(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockBackupClient_UpdateStatusCompleted_Call) RunAndReturn(run func(con func (_m *mockBackupClient) UpdateStatusDeleting(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockBackupClient_UpdateStatusDeleting_Call) RunAndReturn(run func(cont func (_m *mockBackupClient) UpdateStatusFailed(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockBackupClient_UpdateStatusFailed_Call) RunAndReturn(run func(contex func (_m *mockBackupClient) UpdateStatusInProgress(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockBackupClient_UpdateStatusInProgress_Call) RunAndReturn(run func(co func (_m *mockBackupClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockBackupClient_Watch_Call) RunAndReturn(run func(context.Context, me return _c } -type mockConstructorTestingTnewMockBackupClient interface { +// newMockBackupClient creates a new instance of mockBackupClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupClient(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupClient creates a new instance of mockBackupClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupClient(t mockConstructorTestingTnewMockBackupClient) *mockBackupClient { +}) *mockBackupClient { mock := &mockBackupClient{} mock.Mock.Test(t) diff --git a/pkg/garbagecollection/mock_ecosystemClientSet_test.go b/pkg/garbagecollection/mock_ecosystemClientSet_test.go index 3cf45d3..a4c252f 100644 --- a/pkg/garbagecollection/mock_ecosystemClientSet_test.go +++ b/pkg/garbagecollection/mock_ecosystemClientSet_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package garbagecollection @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemClientSet) EXPECT() *mockEcosystemClientSet_Expecter { func (_m *mockEcosystemClientSet) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemClientSet) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemClientSet) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemClientSet) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemClientSet_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemClientSet) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemClientSet) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemClientSet) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemClientSet) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemClientSet) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemClientSet) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemClientSet) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemClientSet) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemClientSet_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemClientSet) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemClientSet_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemClientSet) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemClientSet) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemClientSet_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemClientSet_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) CoordinationV1alpha1() *mockEcosystemClientSet_CoordinationV1alpha1_Call { + return &mockEcosystemClientSet_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemClientSet) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemClientSet_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemClientSet_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemClientSet) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemClientSet_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemClientSet) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemClientSet) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemClientSet_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemClientSet_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemClientSet) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemClientSet_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemClientSet) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemClientSet_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemClientSet_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemClientSet_FlowcontrolV1alpha1_Call struct { +// mockEcosystemClientSet_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemClientSet_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1alpha1() *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { - return &mockEcosystemClientSet_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1() *mockEcosystemClientSet_FlowcontrolV1_Call { + return &mockEcosystemClientSet_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemClientSet_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemClientSet) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemClientSet_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemClientSet) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemClientSet_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemClientSet) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemClientSet_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemClientSet) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemClientSet_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemClientSet) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemClientSet_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemClientSet) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemClientSet_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemClientSet) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemClientSet_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemClientSet) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemClientSet_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemClientSet_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemClientSet_ResourceV1alpha2_Call struct { +// mockEcosystemClientSet_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemClientSet_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha2() *mockEcosystemClientSet_ResourceV1alpha2_Call { - return &mockEcosystemClientSet_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha3() *mockEcosystemClientSet_ResourceV1alpha3_Call { + return &mockEcosystemClientSet_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemClientSet) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemClientSet_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemClientSet) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemClientSet_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemClientSet) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemClientSet_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemClientSet interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemClientSet_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) StoragemigrationV1alpha1() *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + return &mockEcosystemClientSet_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemClientSet creates a new instance of mockEcosystemClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemClientSet(t mockConstructorTestingTnewMockEcosystemClientSet) *mockEcosystemClientSet { +// The first argument is typically a *testing.T value. +func newMockEcosystemClientSet(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemClientSet { mock := &mockEcosystemClientSet{} mock.Mock.Test(t) diff --git a/pkg/garbagecollection/mock_ecosystemV1Alpha1_test.go b/pkg/garbagecollection/mock_ecosystemV1Alpha1_test.go index a2eb4cb..40c265d 100644 --- a/pkg/garbagecollection/mock_ecosystemV1Alpha1_test.go +++ b/pkg/garbagecollection/mock_ecosystemV1Alpha1_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package garbagecollection @@ -24,6 +24,10 @@ func (_m *mockEcosystemV1Alpha1) EXPECT() *mockEcosystemV1Alpha1_Expecter { func (_m *mockEcosystemV1Alpha1) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockEcosystemV1Alpha1_BackupSchedules_Call) RunAndReturn(run func(stri func (_m *mockEcosystemV1Alpha1) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockEcosystemV1Alpha1_Backups_Call) RunAndReturn(run func(string) ecos func (_m *mockEcosystemV1Alpha1) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockEcosystemV1Alpha1_Restores_Call) RunAndReturn(run func(string) eco return _c } -type mockConstructorTestingTnewMockEcosystemV1Alpha1 interface { +// newMockEcosystemV1Alpha1 creates a new instance of mockEcosystemV1Alpha1. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemV1Alpha1(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemV1Alpha1 creates a new instance of mockEcosystemV1Alpha1. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemV1Alpha1(t mockConstructorTestingTnewMockEcosystemV1Alpha1) *mockEcosystemV1Alpha1 { +}) *mockEcosystemV1Alpha1 { mock := &mockEcosystemV1Alpha1{} mock.Mock.Test(t) diff --git a/pkg/garbagecollection/mock_strategyGetter_test.go b/pkg/garbagecollection/mock_strategyGetter_test.go index fb004f9..4e0773c 100644 --- a/pkg/garbagecollection/mock_strategyGetter_test.go +++ b/pkg/garbagecollection/mock_strategyGetter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package garbagecollection @@ -24,6 +24,10 @@ func (_m *mockStrategyGetter) EXPECT() *mockStrategyGetter_Expecter { func (_m *mockStrategyGetter) Get(name retention.StrategyId) (retention.Strategy, error) { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 retention.Strategy var r1 error if rf, ok := ret.Get(0).(func(retention.StrategyId) (retention.Strategy, error)); ok { @@ -74,13 +78,12 @@ func (_c *mockStrategyGetter_Get_Call) RunAndReturn(run func(retention.StrategyI return _c } -type mockConstructorTestingTnewMockStrategyGetter interface { +// newMockStrategyGetter creates a new instance of mockStrategyGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockStrategyGetter(t interface { mock.TestingT Cleanup(func()) -} - -// newMockStrategyGetter creates a new instance of mockStrategyGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockStrategyGetter(t mockConstructorTestingTnewMockStrategyGetter) *mockStrategyGetter { +}) *mockStrategyGetter { mock := &mockStrategyGetter{} mock.Mock.Test(t) diff --git a/pkg/garbagecollection/mock_strategy_test.go b/pkg/garbagecollection/mock_strategy_test.go index 8298892..00dbd94 100644 --- a/pkg/garbagecollection/mock_strategy_test.go +++ b/pkg/garbagecollection/mock_strategy_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package garbagecollection @@ -25,6 +25,10 @@ func (_m *mockStrategy) EXPECT() *mockStrategy_Expecter { func (_m *mockStrategy) FilterForRemoval(allBackups []v1.Backup) (retention.RemovedBackups, retention.RetainedBackups) { ret := _m.Called(allBackups) + if len(ret) == 0 { + panic("no return value specified for FilterForRemoval") + } + var r0 retention.RemovedBackups var r1 retention.RetainedBackups if rf, ok := ret.Get(0).(func([]v1.Backup) (retention.RemovedBackups, retention.RetainedBackups)); ok { @@ -81,6 +85,10 @@ func (_c *mockStrategy_FilterForRemoval_Call) RunAndReturn(run func([]v1.Backup) func (_m *mockStrategy) GetName() retention.StrategyId { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetName") + } + var r0 retention.StrategyId if rf, ok := ret.Get(0).(func() retention.StrategyId); ok { r0 = rf() @@ -118,13 +126,12 @@ func (_c *mockStrategy_GetName_Call) RunAndReturn(run func() retention.StrategyI return _c } -type mockConstructorTestingTnewMockStrategy interface { +// newMockStrategy creates a new instance of mockStrategy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockStrategy(t interface { mock.TestingT Cleanup(func()) -} - -// newMockStrategy creates a new instance of mockStrategy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockStrategy(t mockConstructorTestingTnewMockStrategy) *mockStrategy { +}) *mockStrategy { mock := &mockStrategy{} mock.Mock.Test(t) diff --git a/pkg/maintenance/mock_globalConfig_test.go b/pkg/maintenance/mock_globalConfig_test.go index 5bb307e..2a366ec 100644 --- a/pkg/maintenance/mock_globalConfig_test.go +++ b/pkg/maintenance/mock_globalConfig_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package maintenance @@ -21,6 +21,10 @@ func (_m *mockGlobalConfig) EXPECT() *mockGlobalConfig_Expecter { func (_m *mockGlobalConfig) Delete(key string) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(key) @@ -63,6 +67,10 @@ func (_c *mockGlobalConfig_Delete_Call) RunAndReturn(run func(string) error) *mo func (_m *mockGlobalConfig) DeleteRecursive(key string) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for DeleteRecursive") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(key) @@ -105,6 +113,10 @@ func (_c *mockGlobalConfig_DeleteRecursive_Call) RunAndReturn(run func(string) e func (_m *mockGlobalConfig) Exists(key string) (bool, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -157,6 +169,10 @@ func (_c *mockGlobalConfig_Exists_Call) RunAndReturn(run func(string) (bool, err func (_m *mockGlobalConfig) Get(key string) (string, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -209,6 +225,10 @@ func (_c *mockGlobalConfig_Get_Call) RunAndReturn(run func(string) (string, erro func (_m *mockGlobalConfig) GetAll() (map[string]string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAll") + } + var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { @@ -262,6 +282,10 @@ func (_c *mockGlobalConfig_GetAll_Call) RunAndReturn(run func() (map[string]stri func (_m *mockGlobalConfig) GetOrFalse(key string) (bool, string, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for GetOrFalse") + } + var r0 bool var r1 string var r2 error @@ -321,6 +345,10 @@ func (_c *mockGlobalConfig_GetOrFalse_Call) RunAndReturn(run func(string) (bool, func (_m *mockGlobalConfig) Refresh(key string, timeToLiveInSeconds int) error { ret := _m.Called(key, timeToLiveInSeconds) + if len(ret) == 0 { + panic("no return value specified for Refresh") + } + var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(key, timeToLiveInSeconds) @@ -364,6 +392,10 @@ func (_c *mockGlobalConfig_Refresh_Call) RunAndReturn(run func(string, int) erro func (_m *mockGlobalConfig) RemoveAll() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoveAll") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -405,6 +437,10 @@ func (_c *mockGlobalConfig_RemoveAll_Call) RunAndReturn(run func() error) *mockG func (_m *mockGlobalConfig) Set(key string, value string) error { ret := _m.Called(key, value) + if len(ret) == 0 { + panic("no return value specified for Set") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(key, value) @@ -448,6 +484,10 @@ func (_c *mockGlobalConfig_Set_Call) RunAndReturn(run func(string, string) error func (_m *mockGlobalConfig) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { ret := _m.Called(key, value, timeToLiveInSeconds) + if len(ret) == 0 { + panic("no return value specified for SetWithLifetime") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int) error); ok { r0 = rf(key, value, timeToLiveInSeconds) @@ -488,13 +528,12 @@ func (_c *mockGlobalConfig_SetWithLifetime_Call) RunAndReturn(run func(string, s return _c } -type mockConstructorTestingTnewMockGlobalConfig interface { +// newMockGlobalConfig creates a new instance of mockGlobalConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGlobalConfig(t interface { mock.TestingT Cleanup(func()) -} - -// newMockGlobalConfig creates a new instance of mockGlobalConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockGlobalConfig(t mockConstructorTestingTnewMockGlobalConfig) *mockGlobalConfig { +}) *mockGlobalConfig { mock := &mockGlobalConfig{} mock.Mock.Test(t) diff --git a/pkg/maintenance/mock_maintenanceModeSwitch_test.go b/pkg/maintenance/mock_maintenanceModeSwitch_test.go index 59d02f1..13ad71c 100644 --- a/pkg/maintenance/mock_maintenanceModeSwitch_test.go +++ b/pkg/maintenance/mock_maintenanceModeSwitch_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package maintenance @@ -25,6 +25,10 @@ func (_m *mockMaintenanceModeSwitch) EXPECT() *mockMaintenanceModeSwitch_Expecte func (_m *mockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { ret := _m.Called(ctx, title, text) + if len(ret) == 0 { + panic("no return value specified for ActivateMaintenanceMode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, title, text) @@ -69,6 +73,10 @@ func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) RunAndReturn(r func (_m *mockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for DeactivateMaintenanceMode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -107,13 +115,12 @@ func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) RunAndReturn return _c } -type mockConstructorTestingTnewMockMaintenanceModeSwitch interface { +// newMockMaintenanceModeSwitch creates a new instance of mockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockMaintenanceModeSwitch(t interface { mock.TestingT Cleanup(func()) -} - -// newMockMaintenanceModeSwitch creates a new instance of mockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockMaintenanceModeSwitch(t mockConstructorTestingTnewMockMaintenanceModeSwitch) *mockMaintenanceModeSwitch { +}) *mockMaintenanceModeSwitch { mock := &mockMaintenanceModeSwitch{} mock.Mock.Test(t) diff --git a/pkg/maintenance/mock_serviceInterface_test.go b/pkg/maintenance/mock_serviceInterface_test.go index 4bf66a5..c885929 100644 --- a/pkg/maintenance/mock_serviceInterface_test.go +++ b/pkg/maintenance/mock_serviceInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package maintenance @@ -37,6 +37,10 @@ func (_m *mockServiceInterface) EXPECT() *mockServiceInterface_Expecter { func (_m *mockServiceInterface) Apply(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for Apply") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)); ok { @@ -93,6 +97,10 @@ func (_c *mockServiceInterface_Apply_Call) RunAndReturn(run func(context.Context func (_m *mockServiceInterface) ApplyStatus(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyStatus") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)); ok { @@ -149,6 +157,10 @@ func (_c *mockServiceInterface_ApplyStatus_Call) RunAndReturn(run func(context.C func (_m *mockServiceInterface) Create(ctx context.Context, service *corev1.Service, opts metav1.CreateOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.CreateOptions) (*corev1.Service, error)); ok { @@ -205,6 +217,10 @@ func (_c *mockServiceInterface_Create_Call) RunAndReturn(run func(context.Contex func (_m *mockServiceInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -249,6 +265,10 @@ func (_c *mockServiceInterface_Delete_Call) RunAndReturn(run func(context.Contex func (_m *mockServiceInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Service, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*corev1.Service, error)); ok { @@ -305,6 +325,10 @@ func (_c *mockServiceInterface_Get_Call) RunAndReturn(run func(context.Context, func (_m *mockServiceInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.ServiceList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *corev1.ServiceList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*corev1.ServiceList, error)); ok { @@ -367,6 +391,10 @@ func (_m *mockServiceInterface) Patch(ctx context.Context, name string, pt types _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.Service, error)); ok { @@ -433,6 +461,10 @@ func (_c *mockServiceInterface_Patch_Call) RunAndReturn(run func(context.Context func (_m *mockServiceInterface) ProxyGet(scheme string, name string, port string, path string, params map[string]string) rest.ResponseWrapper { ret := _m.Called(scheme, name, port, path, params) + if len(ret) == 0 { + panic("no return value specified for ProxyGet") + } + var r0 rest.ResponseWrapper if rf, ok := ret.Get(0).(func(string, string, string, string, map[string]string) rest.ResponseWrapper); ok { r0 = rf(scheme, name, port, path, params) @@ -481,6 +513,10 @@ func (_c *mockServiceInterface_ProxyGet_Call) RunAndReturn(run func(string, stri func (_m *mockServiceInterface) Update(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)); ok { @@ -537,6 +573,10 @@ func (_c *mockServiceInterface_Update_Call) RunAndReturn(run func(context.Contex func (_m *mockServiceInterface) UpdateStatus(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)); ok { @@ -593,6 +633,10 @@ func (_c *mockServiceInterface_UpdateStatus_Call) RunAndReturn(run func(context. func (_m *mockServiceInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -644,13 +688,12 @@ func (_c *mockServiceInterface_Watch_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTnewMockServiceInterface interface { +// newMockServiceInterface creates a new instance of mockServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockServiceInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockServiceInterface creates a new instance of mockServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockServiceInterface(t mockConstructorTestingTnewMockServiceInterface) *mockServiceInterface { +}) *mockServiceInterface { mock := &mockServiceInterface{} mock.Mock.Test(t) diff --git a/pkg/maintenance/mock_statefulSetInterface_test.go b/pkg/maintenance/mock_statefulSetInterface_test.go index 3539a34..3318510 100644 --- a/pkg/maintenance/mock_statefulSetInterface_test.go +++ b/pkg/maintenance/mock_statefulSetInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package maintenance @@ -38,6 +38,10 @@ func (_m *mockStatefulSetInterface) EXPECT() *mockStatefulSetInterface_Expecter func (_m *mockStatefulSetInterface) Apply(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for Apply") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)); ok { @@ -94,6 +98,10 @@ func (_c *mockStatefulSetInterface_Apply_Call) RunAndReturn(run func(context.Con func (_m *mockStatefulSetInterface) ApplyScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.ScaleApplyConfiguration, opts metav1.ApplyOptions) (*apiautoscalingv1.Scale, error) { ret := _m.Called(ctx, statefulSetName, scale, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyScale") + } + var r0 *apiautoscalingv1.Scale var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *autoscalingv1.ScaleApplyConfiguration, metav1.ApplyOptions) (*apiautoscalingv1.Scale, error)); ok { @@ -151,6 +159,10 @@ func (_c *mockStatefulSetInterface_ApplyScale_Call) RunAndReturn(run func(contex func (_m *mockStatefulSetInterface) ApplyStatus(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyStatus") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)); ok { @@ -207,6 +219,10 @@ func (_c *mockStatefulSetInterface_ApplyStatus_Call) RunAndReturn(run func(conte func (_m *mockStatefulSetInterface) Create(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.CreateOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.CreateOptions) (*appsv1.StatefulSet, error)); ok { @@ -263,6 +279,10 @@ func (_c *mockStatefulSetInterface_Create_Call) RunAndReturn(run func(context.Co func (_m *mockStatefulSetInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -307,6 +327,10 @@ func (_c *mockStatefulSetInterface_Delete_Call) RunAndReturn(run func(context.Co func (_m *mockStatefulSetInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -351,6 +375,10 @@ func (_c *mockStatefulSetInterface_DeleteCollection_Call) RunAndReturn(run func( func (_m *mockStatefulSetInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*appsv1.StatefulSet, error)); ok { @@ -407,6 +435,10 @@ func (_c *mockStatefulSetInterface_Get_Call) RunAndReturn(run func(context.Conte func (_m *mockStatefulSetInterface) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*apiautoscalingv1.Scale, error) { ret := _m.Called(ctx, statefulSetName, options) + if len(ret) == 0 { + panic("no return value specified for GetScale") + } + var r0 *apiautoscalingv1.Scale var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*apiautoscalingv1.Scale, error)); ok { @@ -463,6 +495,10 @@ func (_c *mockStatefulSetInterface_GetScale_Call) RunAndReturn(run func(context. func (_m *mockStatefulSetInterface) List(ctx context.Context, opts metav1.ListOptions) (*appsv1.StatefulSetList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *appsv1.StatefulSetList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*appsv1.StatefulSetList, error)); ok { @@ -525,6 +561,10 @@ func (_m *mockStatefulSetInterface) Patch(ctx context.Context, name string, pt t _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*appsv1.StatefulSet, error)); ok { @@ -591,6 +631,10 @@ func (_c *mockStatefulSetInterface_Patch_Call) RunAndReturn(run func(context.Con func (_m *mockStatefulSetInterface) Update(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)); ok { @@ -647,6 +691,10 @@ func (_c *mockStatefulSetInterface_Update_Call) RunAndReturn(run func(context.Co func (_m *mockStatefulSetInterface) UpdateScale(ctx context.Context, statefulSetName string, scale *apiautoscalingv1.Scale, opts metav1.UpdateOptions) (*apiautoscalingv1.Scale, error) { ret := _m.Called(ctx, statefulSetName, scale, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateScale") + } + var r0 *apiautoscalingv1.Scale var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *apiautoscalingv1.Scale, metav1.UpdateOptions) (*apiautoscalingv1.Scale, error)); ok { @@ -704,6 +752,10 @@ func (_c *mockStatefulSetInterface_UpdateScale_Call) RunAndReturn(run func(conte func (_m *mockStatefulSetInterface) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)); ok { @@ -760,6 +812,10 @@ func (_c *mockStatefulSetInterface_UpdateStatus_Call) RunAndReturn(run func(cont func (_m *mockStatefulSetInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -811,13 +867,12 @@ func (_c *mockStatefulSetInterface_Watch_Call) RunAndReturn(run func(context.Con return _c } -type mockConstructorTestingTnewMockStatefulSetInterface interface { +// newMockStatefulSetInterface creates a new instance of mockStatefulSetInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockStatefulSetInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockStatefulSetInterface creates a new instance of mockStatefulSetInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockStatefulSetInterface(t mockConstructorTestingTnewMockStatefulSetInterface) *mockStatefulSetInterface { +}) *mockStatefulSetInterface { mock := &mockStatefulSetInterface{} mock.Mock.Test(t) diff --git a/pkg/maintenance/mock_watcher_test.go b/pkg/maintenance/mock_watcher_test.go index 9abbc2c..499dc65 100644 --- a/pkg/maintenance/mock_watcher_test.go +++ b/pkg/maintenance/mock_watcher_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package maintenance @@ -24,6 +24,10 @@ func (_m *mockWatcher) EXPECT() *mockWatcher_Expecter { func (_m *mockWatcher) ResultChan() <-chan watch.Event { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResultChan") + } + var r0 <-chan watch.Event if rf, ok := ret.Get(0).(func() <-chan watch.Event); ok { r0 = rf() @@ -95,13 +99,12 @@ func (_c *mockWatcher_Stop_Call) RunAndReturn(run func()) *mockWatcher_Stop_Call return _c } -type mockConstructorTestingTnewMockWatcher interface { +// newMockWatcher creates a new instance of mockWatcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockWatcher(t interface { mock.TestingT Cleanup(func()) -} - -// newMockWatcher creates a new instance of mockWatcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockWatcher(t mockConstructorTestingTnewMockWatcher) *mockWatcher { +}) *mockWatcher { mock := &mockWatcher{} mock.Mock.Test(t) diff --git a/pkg/provider/mock_EcosystemClientSet_test.go b/pkg/provider/mock_EcosystemClientSet_test.go index c73ab5e..7ae984c 100644 --- a/pkg/provider/mock_EcosystemClientSet_test.go +++ b/pkg/provider/mock_EcosystemClientSet_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package provider @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *MockEcosystemClientSet) EXPECT() *MockEcosystemClientSet_Expecter { func (_m *MockEcosystemClientSet) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *MockEcosystemClientSet_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *MockEcosystemClientSet) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *MockEcosystemClientSet_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *MockEcosystemClientSet) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *MockEcosystemClientSet_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *MockEcosystemClientSet) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *MockEcosystemClientSet_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *MockEcosystemClientSet) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *MockEcosystemClientSet_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *MockEcosystemClientSet) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *MockEcosystemClientSet_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *MockEcosystemClientSet) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *MockEcosystemClientSet_AuthenticationV1_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *MockEcosystemClientSet_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *MockEcosystemClientSet) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *MockEcosystemClientSet_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *MockEcosystemClientSet) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *MockEcosystemClientSet_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *MockEcosystemClientSet) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *MockEcosystemClientSet_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *MockEcosystemClientSet) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *MockEcosystemClientSet_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *MockEcosystemClientSet) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *MockEcosystemClientSet_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *MockEcosystemClientSet) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *MockEcosystemClientSet_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *MockEcosystemClientSet_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *MockEcosystemClientSet_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *MockEcosystemClientSet) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *MockEcosystemClientSet_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *MockEcosystemClientSet) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *MockEcosystemClientSet_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *MockEcosystemClientSet) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *MockEcosystemClientSet_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *MockEcosystemClientSet) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *MockEcosystemClientSet_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *MockEcosystemClientSet) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *MockEcosystemClientSet_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *MockEcosystemClientSet) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// MockEcosystemClientSet_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type MockEcosystemClientSet_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *MockEcosystemClientSet_Expecter) CoordinationV1alpha1() *MockEcosystemClientSet_CoordinationV1alpha1_Call { + return &MockEcosystemClientSet_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *MockEcosystemClientSet_CoordinationV1alpha1_Call) Run(run func()) *MockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockEcosystemClientSet_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *MockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockEcosystemClientSet_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *MockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *MockEcosystemClientSet) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *MockEcosystemClientSet_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *MockEcosystemClientSet) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *MockEcosystemClientSet_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *MockEcosystemClientSet) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *MockEcosystemClientSet_Discovery_Call) RunAndReturn(run func() discove func (_m *MockEcosystemClientSet) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *MockEcosystemClientSet_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *MockEcosystemClientSet) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *MockEcosystemClientSet_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *MockEcosystemClientSet_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *MockEcosystemClientSet_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *MockEcosystemClientSet) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *MockEcosystemClientSet_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *MockEcosystemClientSet) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *MockEcosystemClientSet_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *MockEcosystemClientSet) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *MockEcosystemClientSet) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// MockEcosystemClientSet_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type MockEcosystemClientSet_FlowcontrolV1alpha1_Call struct { +// MockEcosystemClientSet_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type MockEcosystemClientSet_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *MockEcosystemClientSet_Expecter) FlowcontrolV1alpha1() *MockEcosystemClientSet_FlowcontrolV1alpha1_Call { - return &MockEcosystemClientSet_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *MockEcosystemClientSet_Expecter) FlowcontrolV1() *MockEcosystemClientSet_FlowcontrolV1_Call { + return &MockEcosystemClientSet_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *MockEcosystemClientSet_FlowcontrolV1alpha1_Call) Run(run func()) *MockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *MockEcosystemClientSet_FlowcontrolV1_Call) Run(run func()) *MockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *MockEcosystemClientSet_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *MockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *MockEcosystemClientSet_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *MockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *MockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *MockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *MockEcosystemClientSet_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *MockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *MockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *MockEcosystemClientSet) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *MockEcosystemClientSet_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *MockEcosystemClientSet_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *MockEcosystemClientSet_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *MockEcosystemClientSet_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *MockEcosystemClientSet_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *MockEcosystemClientSet) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *MockEcosystemClientSet_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *MockEcosystemClientSet_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *MockEcosystemClientSet_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *MockEcosystemClientSet) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *MockEcosystemClientSet_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *MockEcosystemClientSet) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *MockEcosystemClientSet_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *MockEcosystemClientSet) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *MockEcosystemClientSet_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *MockEcosystemClientSet) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *MockEcosystemClientSet_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *MockEcosystemClientSet) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *MockEcosystemClientSet_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *MockEcosystemClientSet) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *MockEcosystemClientSet_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *MockEcosystemClientSet) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *MockEcosystemClientSet_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *MockEcosystemClientSet) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *MockEcosystemClientSet) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// MockEcosystemClientSet_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type MockEcosystemClientSet_ResourceV1alpha2_Call struct { +// MockEcosystemClientSet_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type MockEcosystemClientSet_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *MockEcosystemClientSet_Expecter) ResourceV1alpha2() *MockEcosystemClientSet_ResourceV1alpha2_Call { - return &MockEcosystemClientSet_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *MockEcosystemClientSet_Expecter) ResourceV1alpha3() *MockEcosystemClientSet_ResourceV1alpha3_Call { + return &MockEcosystemClientSet_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *MockEcosystemClientSet_ResourceV1alpha2_Call) Run(run func()) *MockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *MockEcosystemClientSet_ResourceV1alpha3_Call) Run(run func()) *MockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *MockEcosystemClientSet_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *MockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *MockEcosystemClientSet_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *MockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *MockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *MockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *MockEcosystemClientSet_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *MockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *MockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *MockEcosystemClientSet_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *MockEcosystemClientSet) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *MockEcosystemClientSet_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *MockEcosystemClientSet) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *MockEcosystemClientSet_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *MockEcosystemClientSet) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *MockEcosystemClientSet_StorageV1_Call) RunAndReturn(run func() storage func (_m *MockEcosystemClientSet) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *MockEcosystemClientSet_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *MockEcosystemClientSet) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *MockEcosystemClientSet_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTNewMockEcosystemClientSet interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *MockEcosystemClientSet) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// MockEcosystemClientSet_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type MockEcosystemClientSet_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *MockEcosystemClientSet_Expecter) StoragemigrationV1alpha1() *MockEcosystemClientSet_StoragemigrationV1alpha1_Call { + return &MockEcosystemClientSet_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *MockEcosystemClientSet_StoragemigrationV1alpha1_Call) Run(run func()) *MockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockEcosystemClientSet_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *MockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockEcosystemClientSet_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *MockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // NewMockEcosystemClientSet creates a new instance of MockEcosystemClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockEcosystemClientSet(t mockConstructorTestingTNewMockEcosystemClientSet) *MockEcosystemClientSet { +// The first argument is typically a *testing.T value. +func NewMockEcosystemClientSet(t interface { + mock.TestingT + Cleanup(func()) +}) *MockEcosystemClientSet { mock := &MockEcosystemClientSet{} mock.Mock.Test(t) diff --git a/pkg/provider/mock_EventRecorder_test.go b/pkg/provider/mock_EventRecorder_test.go index 0e6aa96..bbe529d 100644 --- a/pkg/provider/mock_EventRecorder_test.go +++ b/pkg/provider/mock_EventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package provider @@ -151,13 +151,12 @@ func (_c *MockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTNewMockEventRecorder interface { +// NewMockEventRecorder creates a new instance of MockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockEventRecorder creates a new instance of MockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockEventRecorder(t mockConstructorTestingTNewMockEventRecorder) *MockEventRecorder { +}) *MockEventRecorder { mock := &MockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/provider/mock_Provider_test.go b/pkg/provider/mock_Provider_test.go index 11372ae..d93025f 100644 --- a/pkg/provider/mock_Provider_test.go +++ b/pkg/provider/mock_Provider_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package provider @@ -26,6 +26,10 @@ func (_m *MockProvider) EXPECT() *MockProvider_Expecter { func (_m *MockProvider) CheckReady(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CheckReady") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -68,6 +72,10 @@ func (_c *MockProvider_CheckReady_Call) RunAndReturn(run func(context.Context) e func (_m *MockProvider) CreateBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for CreateBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -111,6 +119,10 @@ func (_c *MockProvider_CreateBackup_Call) RunAndReturn(run func(context.Context, func (_m *MockProvider) CreateRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for CreateRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -154,6 +166,10 @@ func (_c *MockProvider_CreateRestore_Call) RunAndReturn(run func(context.Context func (_m *MockProvider) DeleteBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for DeleteBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -197,6 +213,10 @@ func (_c *MockProvider_DeleteBackup_Call) RunAndReturn(run func(context.Context, func (_m *MockProvider) DeleteRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for DeleteRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -240,6 +260,10 @@ func (_c *MockProvider_DeleteRestore_Call) RunAndReturn(run func(context.Context func (_m *MockProvider) SyncBackupStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for SyncBackupStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -283,6 +307,10 @@ func (_c *MockProvider_SyncBackupStatus_Call) RunAndReturn(run func(context.Cont func (_m *MockProvider) SyncBackups(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SyncBackups") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -321,13 +349,12 @@ func (_c *MockProvider_SyncBackups_Call) RunAndReturn(run func(context.Context) return _c } -type mockConstructorTestingTNewMockProvider interface { +// NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockProvider(t mockConstructorTestingTNewMockProvider) *MockProvider { +}) *MockProvider { mock := &MockProvider{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_RestoreV1Alpha1Interface_test.go b/pkg/requeue/mock_RestoreV1Alpha1Interface_test.go index d03434f..c50bd50 100644 --- a/pkg/requeue/mock_RestoreV1Alpha1Interface_test.go +++ b/pkg/requeue/mock_RestoreV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -24,6 +24,10 @@ func (_m *MockRestoreV1Alpha1Interface) EXPECT() *MockRestoreV1Alpha1Interface_E func (_m *MockRestoreV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *MockRestoreV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run fu func (_m *MockRestoreV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *MockRestoreV1Alpha1Interface_Backups_Call) RunAndReturn(run func(strin func (_m *MockRestoreV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *MockRestoreV1Alpha1Interface_Restores_Call) RunAndReturn(run func(stri return _c } -type mockConstructorTestingTNewMockRestoreV1Alpha1Interface interface { +// NewMockRestoreV1Alpha1Interface creates a new instance of MockRestoreV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRestoreV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockRestoreV1Alpha1Interface creates a new instance of MockRestoreV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockRestoreV1Alpha1Interface(t mockConstructorTestingTNewMockRestoreV1Alpha1Interface) *MockRestoreV1Alpha1Interface { +}) *MockRestoreV1Alpha1Interface { mock := &MockRestoreV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_backupV1Alpha1Interface_test.go b/pkg/requeue/mock_backupV1Alpha1Interface_test.go index ebcb016..5de5253 100644 --- a/pkg/requeue/mock_backupV1Alpha1Interface_test.go +++ b/pkg/requeue/mock_backupV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -24,6 +24,10 @@ func (_m *mockBackupV1Alpha1Interface) EXPECT() *mockBackupV1Alpha1Interface_Exp func (_m *mockBackupV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockBackupV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run fun func (_m *mockBackupV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockBackupV1Alpha1Interface_Backups_Call) RunAndReturn(run func(string func (_m *mockBackupV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockBackupV1Alpha1Interface_Restores_Call) RunAndReturn(run func(strin return _c } -type mockConstructorTestingTnewMockBackupV1Alpha1Interface interface { +// newMockBackupV1Alpha1Interface creates a new instance of mockBackupV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupV1Alpha1Interface creates a new instance of mockBackupV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupV1Alpha1Interface(t mockConstructorTestingTnewMockBackupV1Alpha1Interface) *mockBackupV1Alpha1Interface { +}) *mockBackupV1Alpha1Interface { mock := &mockBackupV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_ecosystemBackupInterface_test.go b/pkg/requeue/mock_ecosystemBackupInterface_test.go index cb80904..60f7ed5 100644 --- a/pkg/requeue/mock_ecosystemBackupInterface_test.go +++ b/pkg/requeue/mock_ecosystemBackupInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -32,6 +32,10 @@ func (_m *mockEcosystemBackupInterface) EXPECT() *mockEcosystemBackupInterface_E func (_m *mockEcosystemBackupInterface) AddFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemBackupInterface_AddFinalizer_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) AddLabels(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemBackupInterface_AddLabels_Call) RunAndReturn(run func(con func (_m *mockEcosystemBackupInterface) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemBackupInterface_Create_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemBackupInterface_Delete_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemBackupInterface_DeleteCollection_Call) RunAndReturn(run f func (_m *mockEcosystemBackupInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemBackupInterface_Get_Call) RunAndReturn(run func(context.C func (_m *mockEcosystemBackupInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemBackupInterface) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemBackupInterface_Patch_Call) RunAndReturn(run func(context func (_m *mockEcosystemBackupInterface) RemoveFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemBackupInterface_RemoveFinalizer_Call) RunAndReturn(run fu func (_m *mockEcosystemBackupInterface) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemBackupInterface_Update_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatus_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) UpdateStatusCompleted(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusCompleted_Call) RunAndReturn( func (_m *mockEcosystemBackupInterface) UpdateStatusDeleting(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusDeleting_Call) RunAndReturn(r func (_m *mockEcosystemBackupInterface) UpdateStatusFailed(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusFailed_Call) RunAndReturn(run func (_m *mockEcosystemBackupInterface) UpdateStatusInProgress(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusInProgress_Call) RunAndReturn func (_m *mockEcosystemBackupInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockEcosystemBackupInterface_Watch_Call) RunAndReturn(run func(context return _c } -type mockConstructorTestingTnewMockEcosystemBackupInterface interface { +// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemBackupInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemBackupInterface(t mockConstructorTestingTnewMockEcosystemBackupInterface) *mockEcosystemBackupInterface { +}) *mockEcosystemBackupInterface { mock := &mockEcosystemBackupInterface{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_ecosystemInterface_test.go b/pkg/requeue/mock_ecosystemInterface_test.go index d8c3e18..3e65e28 100644 --- a/pkg/requeue/mock_ecosystemInterface_test.go +++ b/pkg/requeue/mock_ecosystemInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemInterface) EXPECT() *mockEcosystemInterface_Expecter { func (_m *mockEcosystemInterface) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemInterface) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemInterface) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemInterface) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemInterface_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemInterface) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemInterface_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemInterface) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemInterface_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemInterface) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemInterface) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemInterface) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemInterface) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemInterface_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemInterface) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemInterface) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemInterface_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemInterface) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemInterface_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemInterface) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemInterface_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemInterface) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemInterface_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemInterface_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemInterface_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemInterface_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) CoordinationV1alpha1() *mockEcosystemInterface_CoordinationV1alpha1_Call { + return &mockEcosystemInterface_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemInterface) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemInterface_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemInterface_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemInterface) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemInterface_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemInterface) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemInterface) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemInterface_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemInterface_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemInterface) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemInterface_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemInterface) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemInterface_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemInterface) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemInterface_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemInterface_FlowcontrolV1alpha1_Call struct { +// mockEcosystemInterface_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemInterface_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1alpha1() *mockEcosystemInterface_FlowcontrolV1alpha1_Call { - return &mockEcosystemInterface_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1() *mockEcosystemInterface_FlowcontrolV1_Call { + return &mockEcosystemInterface_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemInterface_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemInterface_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemInterface) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemInterface_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemInterface_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemInterface_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemInterface) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemInterface_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemInterface) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemInterface_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemInterface) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemInterface_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemInterface) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemInterface_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemInterface) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemInterface_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemInterface) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemInterface_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemInterface) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemInterface_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemInterface) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemInterface_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemInterface_ResourceV1alpha2_Call struct { +// mockEcosystemInterface_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemInterface_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha2() *mockEcosystemInterface_ResourceV1alpha2_Call { - return &mockEcosystemInterface_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha3() *mockEcosystemInterface_ResourceV1alpha3_Call { + return &mockEcosystemInterface_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemInterface_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemInterface) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemInterface_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemInterface_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemInterface_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemInterface) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemInterface_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemInterface) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemInterface_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemInterface interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemInterface_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) StoragemigrationV1alpha1() *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + return &mockEcosystemInterface_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemInterface creates a new instance of mockEcosystemInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemInterface(t mockConstructorTestingTnewMockEcosystemInterface) *mockEcosystemInterface { +// The first argument is typically a *testing.T value. +func newMockEcosystemInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemInterface { mock := &mockEcosystemInterface{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_ecosystemRestoreInterface_test.go b/pkg/requeue/mock_ecosystemRestoreInterface_test.go index f56c7a5..577bf4f 100644 --- a/pkg/requeue/mock_ecosystemRestoreInterface_test.go +++ b/pkg/requeue/mock_ecosystemRestoreInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -32,6 +32,10 @@ func (_m *mockEcosystemRestoreInterface) EXPECT() *mockEcosystemRestoreInterface func (_m *mockEcosystemRestoreInterface) AddFinalizer(ctx context.Context, restore *v1.Restore, finalizer string) (*v1.Restore, error) { ret := _m.Called(ctx, restore, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, string) (*v1.Restore, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemRestoreInterface_AddFinalizer_Call) RunAndReturn(run func func (_m *mockEcosystemRestoreInterface) AddLabels(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemRestoreInterface_AddLabels_Call) RunAndReturn(run func(co func (_m *mockEcosystemRestoreInterface) Create(ctx context.Context, restore *v1.Restore, opts metav1.CreateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.CreateOptions) (*v1.Restore, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemRestoreInterface_Create_Call) RunAndReturn(run func(conte func (_m *mockEcosystemRestoreInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemRestoreInterface_Delete_Call) RunAndReturn(run func(conte func (_m *mockEcosystemRestoreInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemRestoreInterface_DeleteCollection_Call) RunAndReturn(run func (_m *mockEcosystemRestoreInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Restore, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Restore, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemRestoreInterface_Get_Call) RunAndReturn(run func(context. func (_m *mockEcosystemRestoreInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.RestoreList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.RestoreList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.RestoreList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemRestoreInterface) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Restore, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemRestoreInterface_Patch_Call) RunAndReturn(run func(contex func (_m *mockEcosystemRestoreInterface) RemoveFinalizer(ctx context.Context, restore *v1.Restore, finalizer string) (*v1.Restore, error) { ret := _m.Called(ctx, restore, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, string) (*v1.Restore, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemRestoreInterface_RemoveFinalizer_Call) RunAndReturn(run f func (_m *mockEcosystemRestoreInterface) Update(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemRestoreInterface_Update_Call) RunAndReturn(run func(conte func (_m *mockEcosystemRestoreInterface) UpdateStatus(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatus_Call) RunAndReturn(run func func (_m *mockEcosystemRestoreInterface) UpdateStatusCompleted(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusCompleted_Call) RunAndReturn func (_m *mockEcosystemRestoreInterface) UpdateStatusDeleting(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusDeleting_Call) RunAndReturn( func (_m *mockEcosystemRestoreInterface) UpdateStatusFailed(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusFailed_Call) RunAndReturn(ru func (_m *mockEcosystemRestoreInterface) UpdateStatusInProgress(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusInProgress_Call) RunAndRetur func (_m *mockEcosystemRestoreInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockEcosystemRestoreInterface_Watch_Call) RunAndReturn(run func(contex return _c } -type mockConstructorTestingTnewMockEcosystemRestoreInterface interface { +// newMockEcosystemRestoreInterface creates a new instance of mockEcosystemRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemRestoreInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemRestoreInterface creates a new instance of mockEcosystemRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemRestoreInterface(t mockConstructorTestingTnewMockEcosystemRestoreInterface) *mockEcosystemRestoreInterface { +}) *mockEcosystemRestoreInterface { mock := &mockEcosystemRestoreInterface{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_eventRecorder_test.go b/pkg/requeue/mock_eventRecorder_test.go index 12fe0a7..47591d1 100644 --- a/pkg/requeue/mock_eventRecorder_test.go +++ b/pkg/requeue/mock_eventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -151,13 +151,12 @@ func (_c *mockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTnewMockEventRecorder interface { +// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEventRecorder(t mockConstructorTestingTnewMockEventRecorder) *mockEventRecorder { +}) *mockEventRecorder { mock := &mockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/requeue/mock_requeuableError_test.go b/pkg/requeue/mock_requeuableError_test.go index a685ebd..42c4ab1 100644 --- a/pkg/requeue/mock_requeuableError_test.go +++ b/pkg/requeue/mock_requeuableError_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package requeue @@ -25,6 +25,10 @@ func (_m *mockRequeuableError) EXPECT() *mockRequeuableError_Expecter { func (_m *mockRequeuableError) Error() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -66,6 +70,10 @@ func (_c *mockRequeuableError_Error_Call) RunAndReturn(run func() string) *mockR func (_m *mockRequeuableError) GetRequeueTime(requeueTimeNanos time.Duration) time.Duration { ret := _m.Called(requeueTimeNanos) + if len(ret) == 0 { + panic("no return value specified for GetRequeueTime") + } + var r0 time.Duration if rf, ok := ret.Get(0).(func(time.Duration) time.Duration); ok { r0 = rf(requeueTimeNanos) @@ -104,13 +112,12 @@ func (_c *mockRequeuableError_GetRequeueTime_Call) RunAndReturn(run func(time.Du return _c } -type mockConstructorTestingTnewMockRequeuableError interface { +// newMockRequeuableError creates a new instance of mockRequeuableError. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRequeuableError(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRequeuableError creates a new instance of mockRequeuableError. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRequeuableError(t mockConstructorTestingTnewMockRequeuableError) *mockRequeuableError { +}) *mockRequeuableError { mock := &mockRequeuableError{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_appsV1Interface_test.go b/pkg/restore/mock_appsV1Interface_test.go index dd2f2f5..d47fbcb 100644 --- a/pkg/restore/mock_appsV1Interface_test.go +++ b/pkg/restore/mock_appsV1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -26,6 +26,10 @@ func (_m *mockAppsV1Interface) EXPECT() *mockAppsV1Interface_Expecter { func (_m *mockAppsV1Interface) ControllerRevisions(namespace string) v1.ControllerRevisionInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ControllerRevisions") + } + var r0 v1.ControllerRevisionInterface if rf, ok := ret.Get(0).(func(string) v1.ControllerRevisionInterface); ok { r0 = rf(namespace) @@ -70,6 +74,10 @@ func (_c *mockAppsV1Interface_ControllerRevisions_Call) RunAndReturn(run func(st func (_m *mockAppsV1Interface) DaemonSets(namespace string) v1.DaemonSetInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for DaemonSets") + } + var r0 v1.DaemonSetInterface if rf, ok := ret.Get(0).(func(string) v1.DaemonSetInterface); ok { r0 = rf(namespace) @@ -114,6 +122,10 @@ func (_c *mockAppsV1Interface_DaemonSets_Call) RunAndReturn(run func(string) v1. func (_m *mockAppsV1Interface) Deployments(namespace string) v1.DeploymentInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Deployments") + } + var r0 v1.DeploymentInterface if rf, ok := ret.Get(0).(func(string) v1.DeploymentInterface); ok { r0 = rf(namespace) @@ -158,6 +170,10 @@ func (_c *mockAppsV1Interface_Deployments_Call) RunAndReturn(run func(string) v1 func (_m *mockAppsV1Interface) RESTClient() rest.Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + var r0 rest.Interface if rf, ok := ret.Get(0).(func() rest.Interface); ok { r0 = rf() @@ -201,6 +217,10 @@ func (_c *mockAppsV1Interface_RESTClient_Call) RunAndReturn(run func() rest.Inte func (_m *mockAppsV1Interface) ReplicaSets(namespace string) v1.ReplicaSetInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ReplicaSets") + } + var r0 v1.ReplicaSetInterface if rf, ok := ret.Get(0).(func(string) v1.ReplicaSetInterface); ok { r0 = rf(namespace) @@ -245,6 +265,10 @@ func (_c *mockAppsV1Interface_ReplicaSets_Call) RunAndReturn(run func(string) v1 func (_m *mockAppsV1Interface) StatefulSets(namespace string) v1.StatefulSetInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for StatefulSets") + } + var r0 v1.StatefulSetInterface if rf, ok := ret.Get(0).(func(string) v1.StatefulSetInterface); ok { r0 = rf(namespace) @@ -285,13 +309,12 @@ func (_c *mockAppsV1Interface_StatefulSets_Call) RunAndReturn(run func(string) v return _c } -type mockConstructorTestingTnewMockAppsV1Interface interface { +// newMockAppsV1Interface creates a new instance of mockAppsV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAppsV1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockAppsV1Interface creates a new instance of mockAppsV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockAppsV1Interface(t mockConstructorTestingTnewMockAppsV1Interface) *mockAppsV1Interface { +}) *mockAppsV1Interface { mock := &mockAppsV1Interface{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_cesRegistry_test.go b/pkg/restore/mock_cesRegistry_test.go index 6481480..64fcf34 100644 --- a/pkg/restore/mock_cesRegistry_test.go +++ b/pkg/restore/mock_cesRegistry_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -24,6 +24,10 @@ func (_m *mockCesRegistry) EXPECT() *mockCesRegistry_Expecter { func (_m *mockCesRegistry) BlueprintRegistry() registry.ConfigurationContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BlueprintRegistry") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { r0 = rf() @@ -67,6 +71,10 @@ func (_c *mockCesRegistry_BlueprintRegistry_Call) RunAndReturn(run func() regist func (_m *mockCesRegistry) DoguConfig(dogu string) registry.ConfigurationContext { ret := _m.Called(dogu) + if len(ret) == 0 { + panic("no return value specified for DoguConfig") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { r0 = rf(dogu) @@ -111,6 +119,10 @@ func (_c *mockCesRegistry_DoguConfig_Call) RunAndReturn(run func(string) registr func (_m *mockCesRegistry) DoguRegistry() registry.DoguRegistry { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DoguRegistry") + } + var r0 registry.DoguRegistry if rf, ok := ret.Get(0).(func() registry.DoguRegistry); ok { r0 = rf() @@ -154,6 +166,10 @@ func (_c *mockCesRegistry_DoguRegistry_Call) RunAndReturn(run func() registry.Do func (_m *mockCesRegistry) GetNode() (registry.Node, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNode") + } + var r0 registry.Node var r1 error if rf, ok := ret.Get(0).(func() (registry.Node, error)); ok { @@ -205,6 +221,10 @@ func (_c *mockCesRegistry_GetNode_Call) RunAndReturn(run func() (registry.Node, func (_m *mockCesRegistry) GlobalConfig() registry.ConfigurationContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GlobalConfig") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { r0 = rf() @@ -248,6 +268,10 @@ func (_c *mockCesRegistry_GlobalConfig_Call) RunAndReturn(run func() registry.Co func (_m *mockCesRegistry) HostConfig(hostService string) registry.ConfigurationContext { ret := _m.Called(hostService) + if len(ret) == 0 { + panic("no return value specified for HostConfig") + } + var r0 registry.ConfigurationContext if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { r0 = rf(hostService) @@ -292,6 +316,10 @@ func (_c *mockCesRegistry_HostConfig_Call) RunAndReturn(run func(string) registr func (_m *mockCesRegistry) RootConfig() registry.WatchConfigurationContext { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RootConfig") + } + var r0 registry.WatchConfigurationContext if rf, ok := ret.Get(0).(func() registry.WatchConfigurationContext); ok { r0 = rf() @@ -335,6 +363,10 @@ func (_c *mockCesRegistry_RootConfig_Call) RunAndReturn(run func() registry.Watc func (_m *mockCesRegistry) State(dogu string) registry.State { ret := _m.Called(dogu) + if len(ret) == 0 { + panic("no return value specified for State") + } + var r0 registry.State if rf, ok := ret.Get(0).(func(string) registry.State); ok { r0 = rf(dogu) @@ -375,13 +407,12 @@ func (_c *mockCesRegistry_State_Call) RunAndReturn(run func(string) registry.Sta return _c } -type mockConstructorTestingTnewMockCesRegistry interface { +// newMockCesRegistry creates a new instance of mockCesRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCesRegistry(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCesRegistry creates a new instance of mockCesRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCesRegistry(t mockConstructorTestingTnewMockCesRegistry) *mockCesRegistry { +}) *mockCesRegistry { mock := &mockCesRegistry{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_cleanupManager_test.go b/pkg/restore/mock_cleanupManager_test.go index 79e22dc..7ab13eb 100644 --- a/pkg/restore/mock_cleanupManager_test.go +++ b/pkg/restore/mock_cleanupManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -25,6 +25,10 @@ func (_m *mockCleanupManager) EXPECT() *mockCleanupManager_Expecter { func (_m *mockCleanupManager) Cleanup(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Cleanup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -63,13 +67,12 @@ func (_c *mockCleanupManager_Cleanup_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTnewMockCleanupManager interface { +// newMockCleanupManager creates a new instance of mockCleanupManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCleanupManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCleanupManager creates a new instance of mockCleanupManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCleanupManager(t mockConstructorTestingTnewMockCleanupManager) *mockCleanupManager { +}) *mockCleanupManager { mock := &mockCleanupManager{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_configurationContext_test.go b/pkg/restore/mock_configurationContext_test.go index bd93637..0387be7 100644 --- a/pkg/restore/mock_configurationContext_test.go +++ b/pkg/restore/mock_configurationContext_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -21,6 +21,10 @@ func (_m *mockConfigurationContext) EXPECT() *mockConfigurationContext_Expecter func (_m *mockConfigurationContext) Delete(key string) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(key) @@ -63,6 +67,10 @@ func (_c *mockConfigurationContext_Delete_Call) RunAndReturn(run func(string) er func (_m *mockConfigurationContext) DeleteRecursive(key string) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for DeleteRecursive") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(key) @@ -105,6 +113,10 @@ func (_c *mockConfigurationContext_DeleteRecursive_Call) RunAndReturn(run func(s func (_m *mockConfigurationContext) Exists(key string) (bool, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -157,6 +169,10 @@ func (_c *mockConfigurationContext_Exists_Call) RunAndReturn(run func(string) (b func (_m *mockConfigurationContext) Get(key string) (string, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(string) (string, error)); ok { @@ -209,6 +225,10 @@ func (_c *mockConfigurationContext_Get_Call) RunAndReturn(run func(string) (stri func (_m *mockConfigurationContext) GetAll() (map[string]string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAll") + } + var r0 map[string]string var r1 error if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { @@ -262,6 +282,10 @@ func (_c *mockConfigurationContext_GetAll_Call) RunAndReturn(run func() (map[str func (_m *mockConfigurationContext) GetOrFalse(key string) (bool, string, error) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for GetOrFalse") + } + var r0 bool var r1 string var r2 error @@ -321,6 +345,10 @@ func (_c *mockConfigurationContext_GetOrFalse_Call) RunAndReturn(run func(string func (_m *mockConfigurationContext) Refresh(key string, timeToLiveInSeconds int) error { ret := _m.Called(key, timeToLiveInSeconds) + if len(ret) == 0 { + panic("no return value specified for Refresh") + } + var r0 error if rf, ok := ret.Get(0).(func(string, int) error); ok { r0 = rf(key, timeToLiveInSeconds) @@ -364,6 +392,10 @@ func (_c *mockConfigurationContext_Refresh_Call) RunAndReturn(run func(string, i func (_m *mockConfigurationContext) RemoveAll() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoveAll") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -405,6 +437,10 @@ func (_c *mockConfigurationContext_RemoveAll_Call) RunAndReturn(run func() error func (_m *mockConfigurationContext) Set(key string, value string) error { ret := _m.Called(key, value) + if len(ret) == 0 { + panic("no return value specified for Set") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string) error); ok { r0 = rf(key, value) @@ -448,6 +484,10 @@ func (_c *mockConfigurationContext_Set_Call) RunAndReturn(run func(string, strin func (_m *mockConfigurationContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { ret := _m.Called(key, value, timeToLiveInSeconds) + if len(ret) == 0 { + panic("no return value specified for SetWithLifetime") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, int) error); ok { r0 = rf(key, value, timeToLiveInSeconds) @@ -488,13 +528,12 @@ func (_c *mockConfigurationContext_SetWithLifetime_Call) RunAndReturn(run func(s return _c } -type mockConstructorTestingTnewMockConfigurationContext interface { +// newMockConfigurationContext creates a new instance of mockConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockConfigurationContext(t interface { mock.TestingT Cleanup(func()) -} - -// newMockConfigurationContext creates a new instance of mockConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockConfigurationContext(t mockConstructorTestingTnewMockConfigurationContext) *mockConfigurationContext { +}) *mockConfigurationContext { mock := &mockConfigurationContext{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_controllerManager_test.go b/pkg/restore/mock_controllerManager_test.go index 386f27b..9708061 100644 --- a/pkg/restore/mock_controllerManager_test.go +++ b/pkg/restore/mock_controllerManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -48,6 +48,10 @@ func (_m *mockControllerManager) EXPECT() *mockControllerManager_Expecter { func (_m *mockControllerManager) Add(_a0 manager.Runnable) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 error if rf, ok := ret.Get(0).(func(manager.Runnable) error); ok { r0 = rf(_a0) @@ -90,6 +94,10 @@ func (_c *mockControllerManager_Add_Call) RunAndReturn(run func(manager.Runnable func (_m *mockControllerManager) AddHealthzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddHealthzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -129,10 +137,61 @@ func (_c *mockControllerManager_AddHealthzCheck_Call) RunAndReturn(run func(stri return _c } +// AddMetricsServerExtraHandler provides a mock function with given fields: path, handler +func (_m *mockControllerManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error { + ret := _m.Called(path, handler) + + if len(ret) == 0 { + panic("no return value specified for AddMetricsServerExtraHandler") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, http.Handler) error); ok { + r0 = rf(path, handler) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_AddMetricsServerExtraHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMetricsServerExtraHandler' +type mockControllerManager_AddMetricsServerExtraHandler_Call struct { + *mock.Call +} + +// AddMetricsServerExtraHandler is a helper method to define mock.On call +// - path string +// - handler http.Handler +func (_e *mockControllerManager_Expecter) AddMetricsServerExtraHandler(path interface{}, handler interface{}) *mockControllerManager_AddMetricsServerExtraHandler_Call { + return &mockControllerManager_AddMetricsServerExtraHandler_Call{Call: _e.mock.On("AddMetricsServerExtraHandler", path, handler)} +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Run(run func(path string, handler http.Handler)) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(http.Handler)) + }) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Return(_a0 error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) RunAndReturn(run func(string, http.Handler) error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(run) + return _c +} + // AddReadyzCheck provides a mock function with given fields: name, check func (_m *mockControllerManager) AddReadyzCheck(name string, check healthz.Checker) error { ret := _m.Called(name, check) + if len(ret) == 0 { + panic("no return value specified for AddReadyzCheck") + } + var r0 error if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { r0 = rf(name, check) @@ -176,6 +235,10 @@ func (_c *mockControllerManager_AddReadyzCheck_Call) RunAndReturn(run func(strin func (_m *mockControllerManager) Elected() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Elected") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -219,6 +282,10 @@ func (_c *mockControllerManager_Elected_Call) RunAndReturn(run func() <-chan str func (_m *mockControllerManager) GetAPIReader() client.Reader { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAPIReader") + } + var r0 client.Reader if rf, ok := ret.Get(0).(func() client.Reader); ok { r0 = rf() @@ -262,6 +329,10 @@ func (_c *mockControllerManager_GetAPIReader_Call) RunAndReturn(run func() clien func (_m *mockControllerManager) GetCache() cache.Cache { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCache") + } + var r0 cache.Cache if rf, ok := ret.Get(0).(func() cache.Cache); ok { r0 = rf() @@ -305,6 +376,10 @@ func (_c *mockControllerManager_GetCache_Call) RunAndReturn(run func() cache.Cac func (_m *mockControllerManager) GetClient() client.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetClient") + } + var r0 client.Client if rf, ok := ret.Get(0).(func() client.Client); ok { r0 = rf() @@ -348,6 +423,10 @@ func (_c *mockControllerManager_GetClient_Call) RunAndReturn(run func() client.C func (_m *mockControllerManager) GetConfig() *rest.Config { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetConfig") + } + var r0 *rest.Config if rf, ok := ret.Get(0).(func() *rest.Config); ok { r0 = rf() @@ -391,6 +470,10 @@ func (_c *mockControllerManager_GetConfig_Call) RunAndReturn(run func() *rest.Co func (_m *mockControllerManager) GetControllerOptions() config.Controller { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetControllerOptions") + } + var r0 config.Controller if rf, ok := ret.Get(0).(func() config.Controller); ok { r0 = rf() @@ -432,6 +515,10 @@ func (_c *mockControllerManager_GetControllerOptions_Call) RunAndReturn(run func func (_m *mockControllerManager) GetEventRecorderFor(name string) record.EventRecorder { ret := _m.Called(name) + if len(ret) == 0 { + panic("no return value specified for GetEventRecorderFor") + } + var r0 record.EventRecorder if rf, ok := ret.Get(0).(func(string) record.EventRecorder); ok { r0 = rf(name) @@ -476,6 +563,10 @@ func (_c *mockControllerManager_GetEventRecorderFor_Call) RunAndReturn(run func( func (_m *mockControllerManager) GetFieldIndexer() client.FieldIndexer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFieldIndexer") + } + var r0 client.FieldIndexer if rf, ok := ret.Get(0).(func() client.FieldIndexer); ok { r0 = rf() @@ -519,6 +610,10 @@ func (_c *mockControllerManager_GetFieldIndexer_Call) RunAndReturn(run func() cl func (_m *mockControllerManager) GetHTTPClient() *http.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHTTPClient") + } + var r0 *http.Client if rf, ok := ret.Get(0).(func() *http.Client); ok { r0 = rf() @@ -562,6 +657,10 @@ func (_c *mockControllerManager_GetHTTPClient_Call) RunAndReturn(run func() *htt func (_m *mockControllerManager) GetLogger() logr.Logger { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLogger") + } + var r0 logr.Logger if rf, ok := ret.Get(0).(func() logr.Logger); ok { r0 = rf() @@ -603,6 +702,10 @@ func (_c *mockControllerManager_GetLogger_Call) RunAndReturn(run func() logr.Log func (_m *mockControllerManager) GetRESTMapper() meta.RESTMapper { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRESTMapper") + } + var r0 meta.RESTMapper if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { r0 = rf() @@ -646,6 +749,10 @@ func (_c *mockControllerManager_GetRESTMapper_Call) RunAndReturn(run func() meta func (_m *mockControllerManager) GetScheme() *runtime.Scheme { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetScheme") + } + var r0 *runtime.Scheme if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { r0 = rf() @@ -689,6 +796,10 @@ func (_c *mockControllerManager_GetScheme_Call) RunAndReturn(run func() *runtime func (_m *mockControllerManager) GetWebhookServer() webhook.Server { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetWebhookServer") + } + var r0 webhook.Server if rf, ok := ret.Get(0).(func() webhook.Server); ok { r0 = rf() @@ -732,6 +843,10 @@ func (_c *mockControllerManager_GetWebhookServer_Call) RunAndReturn(run func() w func (_m *mockControllerManager) Start(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -770,13 +885,12 @@ func (_c *mockControllerManager_Start_Call) RunAndReturn(run func(context.Contex return _c } -type mockConstructorTestingTnewMockControllerManager interface { +// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockControllerManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockControllerManager(t mockConstructorTestingTnewMockControllerManager) *mockControllerManager { +}) *mockControllerManager { mock := &mockControllerManager{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_coreV1Interface_test.go b/pkg/restore/mock_coreV1Interface_test.go index d3df893..82bc726 100644 --- a/pkg/restore/mock_coreV1Interface_test.go +++ b/pkg/restore/mock_coreV1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -26,6 +26,10 @@ func (_m *mockCoreV1Interface) EXPECT() *mockCoreV1Interface_Expecter { func (_m *mockCoreV1Interface) ComponentStatuses() v1.ComponentStatusInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ComponentStatuses") + } + var r0 v1.ComponentStatusInterface if rf, ok := ret.Get(0).(func() v1.ComponentStatusInterface); ok { r0 = rf() @@ -69,6 +73,10 @@ func (_c *mockCoreV1Interface_ComponentStatuses_Call) RunAndReturn(run func() v1 func (_m *mockCoreV1Interface) ConfigMaps(namespace string) v1.ConfigMapInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ConfigMaps") + } + var r0 v1.ConfigMapInterface if rf, ok := ret.Get(0).(func(string) v1.ConfigMapInterface); ok { r0 = rf(namespace) @@ -113,6 +121,10 @@ func (_c *mockCoreV1Interface_ConfigMaps_Call) RunAndReturn(run func(string) v1. func (_m *mockCoreV1Interface) Endpoints(namespace string) v1.EndpointsInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Endpoints") + } + var r0 v1.EndpointsInterface if rf, ok := ret.Get(0).(func(string) v1.EndpointsInterface); ok { r0 = rf(namespace) @@ -157,6 +169,10 @@ func (_c *mockCoreV1Interface_Endpoints_Call) RunAndReturn(run func(string) v1.E func (_m *mockCoreV1Interface) Events(namespace string) v1.EventInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 v1.EventInterface if rf, ok := ret.Get(0).(func(string) v1.EventInterface); ok { r0 = rf(namespace) @@ -201,6 +217,10 @@ func (_c *mockCoreV1Interface_Events_Call) RunAndReturn(run func(string) v1.Even func (_m *mockCoreV1Interface) LimitRanges(namespace string) v1.LimitRangeInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for LimitRanges") + } + var r0 v1.LimitRangeInterface if rf, ok := ret.Get(0).(func(string) v1.LimitRangeInterface); ok { r0 = rf(namespace) @@ -245,6 +265,10 @@ func (_c *mockCoreV1Interface_LimitRanges_Call) RunAndReturn(run func(string) v1 func (_m *mockCoreV1Interface) Namespaces() v1.NamespaceInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Namespaces") + } + var r0 v1.NamespaceInterface if rf, ok := ret.Get(0).(func() v1.NamespaceInterface); ok { r0 = rf() @@ -288,6 +312,10 @@ func (_c *mockCoreV1Interface_Namespaces_Call) RunAndReturn(run func() v1.Namesp func (_m *mockCoreV1Interface) Nodes() v1.NodeInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Nodes") + } + var r0 v1.NodeInterface if rf, ok := ret.Get(0).(func() v1.NodeInterface); ok { r0 = rf() @@ -331,6 +359,10 @@ func (_c *mockCoreV1Interface_Nodes_Call) RunAndReturn(run func() v1.NodeInterfa func (_m *mockCoreV1Interface) PersistentVolumeClaims(namespace string) v1.PersistentVolumeClaimInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for PersistentVolumeClaims") + } + var r0 v1.PersistentVolumeClaimInterface if rf, ok := ret.Get(0).(func(string) v1.PersistentVolumeClaimInterface); ok { r0 = rf(namespace) @@ -375,6 +407,10 @@ func (_c *mockCoreV1Interface_PersistentVolumeClaims_Call) RunAndReturn(run func func (_m *mockCoreV1Interface) PersistentVolumes() v1.PersistentVolumeInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PersistentVolumes") + } + var r0 v1.PersistentVolumeInterface if rf, ok := ret.Get(0).(func() v1.PersistentVolumeInterface); ok { r0 = rf() @@ -418,6 +454,10 @@ func (_c *mockCoreV1Interface_PersistentVolumes_Call) RunAndReturn(run func() v1 func (_m *mockCoreV1Interface) PodTemplates(namespace string) v1.PodTemplateInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for PodTemplates") + } + var r0 v1.PodTemplateInterface if rf, ok := ret.Get(0).(func(string) v1.PodTemplateInterface); ok { r0 = rf(namespace) @@ -462,6 +502,10 @@ func (_c *mockCoreV1Interface_PodTemplates_Call) RunAndReturn(run func(string) v func (_m *mockCoreV1Interface) Pods(namespace string) v1.PodInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Pods") + } + var r0 v1.PodInterface if rf, ok := ret.Get(0).(func(string) v1.PodInterface); ok { r0 = rf(namespace) @@ -506,6 +550,10 @@ func (_c *mockCoreV1Interface_Pods_Call) RunAndReturn(run func(string) v1.PodInt func (_m *mockCoreV1Interface) RESTClient() rest.Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + var r0 rest.Interface if rf, ok := ret.Get(0).(func() rest.Interface); ok { r0 = rf() @@ -549,6 +597,10 @@ func (_c *mockCoreV1Interface_RESTClient_Call) RunAndReturn(run func() rest.Inte func (_m *mockCoreV1Interface) ReplicationControllers(namespace string) v1.ReplicationControllerInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ReplicationControllers") + } + var r0 v1.ReplicationControllerInterface if rf, ok := ret.Get(0).(func(string) v1.ReplicationControllerInterface); ok { r0 = rf(namespace) @@ -593,6 +645,10 @@ func (_c *mockCoreV1Interface_ReplicationControllers_Call) RunAndReturn(run func func (_m *mockCoreV1Interface) ResourceQuotas(namespace string) v1.ResourceQuotaInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ResourceQuotas") + } + var r0 v1.ResourceQuotaInterface if rf, ok := ret.Get(0).(func(string) v1.ResourceQuotaInterface); ok { r0 = rf(namespace) @@ -637,6 +693,10 @@ func (_c *mockCoreV1Interface_ResourceQuotas_Call) RunAndReturn(run func(string) func (_m *mockCoreV1Interface) Secrets(namespace string) v1.SecretInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Secrets") + } + var r0 v1.SecretInterface if rf, ok := ret.Get(0).(func(string) v1.SecretInterface); ok { r0 = rf(namespace) @@ -681,6 +741,10 @@ func (_c *mockCoreV1Interface_Secrets_Call) RunAndReturn(run func(string) v1.Sec func (_m *mockCoreV1Interface) ServiceAccounts(namespace string) v1.ServiceAccountInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ServiceAccounts") + } + var r0 v1.ServiceAccountInterface if rf, ok := ret.Get(0).(func(string) v1.ServiceAccountInterface); ok { r0 = rf(namespace) @@ -725,6 +789,10 @@ func (_c *mockCoreV1Interface_ServiceAccounts_Call) RunAndReturn(run func(string func (_m *mockCoreV1Interface) Services(namespace string) v1.ServiceInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Services") + } + var r0 v1.ServiceInterface if rf, ok := ret.Get(0).(func(string) v1.ServiceInterface); ok { r0 = rf(namespace) @@ -765,13 +833,12 @@ func (_c *mockCoreV1Interface_Services_Call) RunAndReturn(run func(string) v1.Se return _c } -type mockConstructorTestingTnewMockCoreV1Interface interface { +// newMockCoreV1Interface creates a new instance of mockCoreV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCoreV1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCoreV1Interface creates a new instance of mockCoreV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCoreV1Interface(t mockConstructorTestingTnewMockCoreV1Interface) *mockCoreV1Interface { +}) *mockCoreV1Interface { mock := &mockCoreV1Interface{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_createManager_test.go b/pkg/restore/mock_createManager_test.go index 8d5bc4d..a83a034 100644 --- a/pkg/restore/mock_createManager_test.go +++ b/pkg/restore/mock_createManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -26,6 +26,10 @@ func (_m *mockCreateManager) EXPECT() *mockCreateManager_Expecter { func (_m *mockCreateManager) create(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -65,13 +69,12 @@ func (_c *mockCreateManager_create_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockCreateManager interface { +// newMockCreateManager creates a new instance of mockCreateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCreateManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockCreateManager creates a new instance of mockCreateManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockCreateManager(t mockConstructorTestingTnewMockCreateManager) *mockCreateManager { +}) *mockCreateManager { mock := &mockCreateManager{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_deleteManager_test.go b/pkg/restore/mock_deleteManager_test.go index 6d84e65..5d280a3 100644 --- a/pkg/restore/mock_deleteManager_test.go +++ b/pkg/restore/mock_deleteManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -26,6 +26,10 @@ func (_m *mockDeleteManager) EXPECT() *mockDeleteManager_Expecter { func (_m *mockDeleteManager) delete(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -65,13 +69,12 @@ func (_c *mockDeleteManager_delete_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockDeleteManager interface { +// newMockDeleteManager creates a new instance of mockDeleteManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDeleteManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockDeleteManager creates a new instance of mockDeleteManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockDeleteManager(t mockConstructorTestingTnewMockDeleteManager) *mockDeleteManager { +}) *mockDeleteManager { mock := &mockDeleteManager{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_ecosystemInterface_test.go b/pkg/restore/mock_ecosystemInterface_test.go index 41f0724..6a0e664 100644 --- a/pkg/restore/mock_ecosystemInterface_test.go +++ b/pkg/restore/mock_ecosystemInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemInterface) EXPECT() *mockEcosystemInterface_Expecter { func (_m *mockEcosystemInterface) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemInterface) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemInterface) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemInterface_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemInterface) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemInterface_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemInterface) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemInterface_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemInterface) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemInterface_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemInterface) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemInterface) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemInterface_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemInterface) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemInterface) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemInterface_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemInterface_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemInterface) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemInterface) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemInterface_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemInterface_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemInterface) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemInterface_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemInterface) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemInterface_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemInterface) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemInterface_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemInterface) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemInterface_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemInterface_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemInterface_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) CoordinationV1alpha1() *mockEcosystemInterface_CoordinationV1alpha1_Call { + return &mockEcosystemInterface_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemInterface_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemInterface) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemInterface_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemInterface_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemInterface) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemInterface_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemInterface) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemInterface) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemInterface_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemInterface_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemInterface_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemInterface) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemInterface_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemInterface) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemInterface_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemInterface) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemInterface_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemInterface_FlowcontrolV1alpha1_Call struct { +// mockEcosystemInterface_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemInterface_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1alpha1() *mockEcosystemInterface_FlowcontrolV1alpha1_Call { - return &mockEcosystemInterface_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) FlowcontrolV1() *mockEcosystemInterface_FlowcontrolV1_Call { + return &mockEcosystemInterface_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Run(run func()) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemInterface_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemInterface_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemInterface_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemInterface) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemInterface_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemInterface_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemInterface_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemInterface) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemInterface_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemInterface_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemInterface_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemInterface) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemInterface_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemInterface) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemInterface_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemInterface) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemInterface_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemInterface) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemInterface_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemInterface) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemInterface_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemInterface) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemInterface_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemInterface) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemInterface_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemInterface) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemInterface_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemInterface_ResourceV1alpha2_Call struct { +// mockEcosystemInterface_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemInterface_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha2() *mockEcosystemInterface_ResourceV1alpha2_Call { - return &mockEcosystemInterface_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) ResourceV1alpha3() *mockEcosystemInterface_ResourceV1alpha3_Call { + return &mockEcosystemInterface_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemInterface_ResourceV1alpha2_Call { +func (_c *mockEcosystemInterface_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemInterface_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemInterface_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemInterface_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemInterface) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemInterface_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemInterface) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemInterface_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemInterface) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemInterface_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemInterface) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemInterface_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemInterface) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemInterface_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemInterface interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemInterface) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemInterface_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemInterface_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemInterface_Expecter) StoragemigrationV1alpha1() *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + return &mockEcosystemInterface_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemInterface_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemInterface_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemInterface creates a new instance of mockEcosystemInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemInterface(t mockConstructorTestingTnewMockEcosystemInterface) *mockEcosystemInterface { +// The first argument is typically a *testing.T value. +func newMockEcosystemInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemInterface { mock := &mockEcosystemInterface{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_ecosystemRestoreInterface_test.go b/pkg/restore/mock_ecosystemRestoreInterface_test.go index 7f8ba88..aae701c 100644 --- a/pkg/restore/mock_ecosystemRestoreInterface_test.go +++ b/pkg/restore/mock_ecosystemRestoreInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -32,6 +32,10 @@ func (_m *mockEcosystemRestoreInterface) EXPECT() *mockEcosystemRestoreInterface func (_m *mockEcosystemRestoreInterface) AddFinalizer(ctx context.Context, restore *v1.Restore, finalizer string) (*v1.Restore, error) { ret := _m.Called(ctx, restore, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, string) (*v1.Restore, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemRestoreInterface_AddFinalizer_Call) RunAndReturn(run func func (_m *mockEcosystemRestoreInterface) AddLabels(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemRestoreInterface_AddLabels_Call) RunAndReturn(run func(co func (_m *mockEcosystemRestoreInterface) Create(ctx context.Context, restore *v1.Restore, opts metav1.CreateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.CreateOptions) (*v1.Restore, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemRestoreInterface_Create_Call) RunAndReturn(run func(conte func (_m *mockEcosystemRestoreInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemRestoreInterface_Delete_Call) RunAndReturn(run func(conte func (_m *mockEcosystemRestoreInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemRestoreInterface_DeleteCollection_Call) RunAndReturn(run func (_m *mockEcosystemRestoreInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Restore, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Restore, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemRestoreInterface_Get_Call) RunAndReturn(run func(context. func (_m *mockEcosystemRestoreInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.RestoreList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.RestoreList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.RestoreList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemRestoreInterface) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Restore, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemRestoreInterface_Patch_Call) RunAndReturn(run func(contex func (_m *mockEcosystemRestoreInterface) RemoveFinalizer(ctx context.Context, restore *v1.Restore, finalizer string) (*v1.Restore, error) { ret := _m.Called(ctx, restore, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, string) (*v1.Restore, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemRestoreInterface_RemoveFinalizer_Call) RunAndReturn(run f func (_m *mockEcosystemRestoreInterface) Update(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemRestoreInterface_Update_Call) RunAndReturn(run func(conte func (_m *mockEcosystemRestoreInterface) UpdateStatus(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatus_Call) RunAndReturn(run func func (_m *mockEcosystemRestoreInterface) UpdateStatusCompleted(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusCompleted_Call) RunAndReturn func (_m *mockEcosystemRestoreInterface) UpdateStatusDeleting(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusDeleting_Call) RunAndReturn( func (_m *mockEcosystemRestoreInterface) UpdateStatusFailed(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusFailed_Call) RunAndReturn(ru func (_m *mockEcosystemRestoreInterface) UpdateStatusInProgress(ctx context.Context, restore *v1.Restore) (*v1.Restore, error) { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) (*v1.Restore, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemRestoreInterface_UpdateStatusInProgress_Call) RunAndRetur func (_m *mockEcosystemRestoreInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockEcosystemRestoreInterface_Watch_Call) RunAndReturn(run func(contex return _c } -type mockConstructorTestingTnewMockEcosystemRestoreInterface interface { +// newMockEcosystemRestoreInterface creates a new instance of mockEcosystemRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemRestoreInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemRestoreInterface creates a new instance of mockEcosystemRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemRestoreInterface(t mockConstructorTestingTnewMockEcosystemRestoreInterface) *mockEcosystemRestoreInterface { +}) *mockEcosystemRestoreInterface { mock := &mockEcosystemRestoreInterface{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_ecosystemV1Alpha1Interface_test.go b/pkg/restore/mock_ecosystemV1Alpha1Interface_test.go index ecfd49c..3640567 100644 --- a/pkg/restore/mock_ecosystemV1Alpha1Interface_test.go +++ b/pkg/restore/mock_ecosystemV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -24,6 +24,10 @@ func (_m *mockEcosystemV1Alpha1Interface) EXPECT() *mockEcosystemV1Alpha1Interfa func (_m *mockEcosystemV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockEcosystemV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run func (_m *mockEcosystemV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockEcosystemV1Alpha1Interface_Backups_Call) RunAndReturn(run func(str func (_m *mockEcosystemV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockEcosystemV1Alpha1Interface_Restores_Call) RunAndReturn(run func(st return _c } -type mockConstructorTestingTnewMockEcosystemV1Alpha1Interface interface { +// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemV1Alpha1Interface(t mockConstructorTestingTnewMockEcosystemV1Alpha1Interface) *mockEcosystemV1Alpha1Interface { +}) *mockEcosystemV1Alpha1Interface { mock := &mockEcosystemV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_eventRecorder_test.go b/pkg/restore/mock_eventRecorder_test.go index 02f3e3f..2631cbb 100644 --- a/pkg/restore/mock_eventRecorder_test.go +++ b/pkg/restore/mock_eventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -151,13 +151,12 @@ func (_c *mockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTnewMockEventRecorder interface { +// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEventRecorder(t mockConstructorTestingTnewMockEventRecorder) *mockEventRecorder { +}) *mockEventRecorder { mock := &mockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_maintenanceModeSwitch_test.go b/pkg/restore/mock_maintenanceModeSwitch_test.go index a044b30..9746a25 100644 --- a/pkg/restore/mock_maintenanceModeSwitch_test.go +++ b/pkg/restore/mock_maintenanceModeSwitch_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -25,6 +25,10 @@ func (_m *mockMaintenanceModeSwitch) EXPECT() *mockMaintenanceModeSwitch_Expecte func (_m *mockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { ret := _m.Called(ctx, title, text) + if len(ret) == 0 { + panic("no return value specified for ActivateMaintenanceMode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, title, text) @@ -69,6 +73,10 @@ func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) RunAndReturn(r func (_m *mockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for DeactivateMaintenanceMode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -107,13 +115,12 @@ func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) RunAndReturn return _c } -type mockConstructorTestingTnewMockMaintenanceModeSwitch interface { +// newMockMaintenanceModeSwitch creates a new instance of mockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockMaintenanceModeSwitch(t interface { mock.TestingT Cleanup(func()) -} - -// newMockMaintenanceModeSwitch creates a new instance of mockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockMaintenanceModeSwitch(t mockConstructorTestingTnewMockMaintenanceModeSwitch) *mockMaintenanceModeSwitch { +}) *mockMaintenanceModeSwitch { mock := &mockMaintenanceModeSwitch{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_requeueHandler_test.go b/pkg/restore/mock_requeueHandler_test.go index cb649b5..b3172ef 100644 --- a/pkg/restore/mock_requeueHandler_test.go +++ b/pkg/restore/mock_requeueHandler_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -28,6 +28,10 @@ func (_m *mockRequeueHandler) EXPECT() *mockRequeueHandler_Expecter { func (_m *mockRequeueHandler) Handle(ctx context.Context, contextMessage string, restore v1.RequeuableObject, originalErr error, requeueStatus string) (reconcile.Result, error) { ret := _m.Called(ctx, contextMessage, restore, originalErr, requeueStatus) + if len(ret) == 0 { + panic("no return value specified for Handle") + } + var r0 reconcile.Result var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, v1.RequeuableObject, error, string) (reconcile.Result, error)); ok { @@ -80,13 +84,12 @@ func (_c *mockRequeueHandler_Handle_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockRequeueHandler interface { +// newMockRequeueHandler creates a new instance of mockRequeueHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRequeueHandler(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRequeueHandler creates a new instance of mockRequeueHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRequeueHandler(t mockConstructorTestingTnewMockRequeueHandler) *mockRequeueHandler { +}) *mockRequeueHandler { mock := &mockRequeueHandler{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_restoreManager_test.go b/pkg/restore/mock_restoreManager_test.go index c3baa12..a0f3566 100644 --- a/pkg/restore/mock_restoreManager_test.go +++ b/pkg/restore/mock_restoreManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -26,6 +26,10 @@ func (_m *mockRestoreManager) EXPECT() *mockRestoreManager_Expecter { func (_m *mockRestoreManager) create(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -69,6 +73,10 @@ func (_c *mockRestoreManager_create_Call) RunAndReturn(run func(context.Context, func (_m *mockRestoreManager) delete(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -108,13 +116,12 @@ func (_c *mockRestoreManager_delete_Call) RunAndReturn(run func(context.Context, return _c } -type mockConstructorTestingTnewMockRestoreManager interface { +// newMockRestoreManager creates a new instance of mockRestoreManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRestoreManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRestoreManager creates a new instance of mockRestoreManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRestoreManager(t mockConstructorTestingTnewMockRestoreManager) *mockRestoreManager { +}) *mockRestoreManager { mock := &mockRestoreManager{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_restoreProvider_test.go b/pkg/restore/mock_restoreProvider_test.go index df172d9..1f82e3a 100644 --- a/pkg/restore/mock_restoreProvider_test.go +++ b/pkg/restore/mock_restoreProvider_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -26,6 +26,10 @@ func (_m *mockRestoreProvider) EXPECT() *mockRestoreProvider_Expecter { func (_m *mockRestoreProvider) CheckReady(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CheckReady") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -68,6 +72,10 @@ func (_c *mockRestoreProvider_CheckReady_Call) RunAndReturn(run func(context.Con func (_m *mockRestoreProvider) CreateBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for CreateBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -111,6 +119,10 @@ func (_c *mockRestoreProvider_CreateBackup_Call) RunAndReturn(run func(context.C func (_m *mockRestoreProvider) CreateRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for CreateRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -154,6 +166,10 @@ func (_c *mockRestoreProvider_CreateRestore_Call) RunAndReturn(run func(context. func (_m *mockRestoreProvider) DeleteBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for DeleteBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -197,6 +213,10 @@ func (_c *mockRestoreProvider_DeleteBackup_Call) RunAndReturn(run func(context.C func (_m *mockRestoreProvider) DeleteRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for DeleteRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -240,6 +260,10 @@ func (_c *mockRestoreProvider_DeleteRestore_Call) RunAndReturn(run func(context. func (_m *mockRestoreProvider) SyncBackupStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for SyncBackupStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -283,6 +307,10 @@ func (_c *mockRestoreProvider_SyncBackupStatus_Call) RunAndReturn(run func(conte func (_m *mockRestoreProvider) SyncBackups(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SyncBackups") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -321,13 +349,12 @@ func (_c *mockRestoreProvider_SyncBackups_Call) RunAndReturn(run func(context.Co return _c } -type mockConstructorTestingTnewMockRestoreProvider interface { +// newMockRestoreProvider creates a new instance of mockRestoreProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRestoreProvider(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRestoreProvider creates a new instance of mockRestoreProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRestoreProvider(t mockConstructorTestingTnewMockRestoreProvider) *mockRestoreProvider { +}) *mockRestoreProvider { mock := &mockRestoreProvider{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_serviceInterface_test.go b/pkg/restore/mock_serviceInterface_test.go index d0d7bd4..5d9ddcc 100644 --- a/pkg/restore/mock_serviceInterface_test.go +++ b/pkg/restore/mock_serviceInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -37,6 +37,10 @@ func (_m *mockServiceInterface) EXPECT() *mockServiceInterface_Expecter { func (_m *mockServiceInterface) Apply(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for Apply") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)); ok { @@ -93,6 +97,10 @@ func (_c *mockServiceInterface_Apply_Call) RunAndReturn(run func(context.Context func (_m *mockServiceInterface) ApplyStatus(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyStatus") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)); ok { @@ -149,6 +157,10 @@ func (_c *mockServiceInterface_ApplyStatus_Call) RunAndReturn(run func(context.C func (_m *mockServiceInterface) Create(ctx context.Context, service *corev1.Service, opts metav1.CreateOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.CreateOptions) (*corev1.Service, error)); ok { @@ -205,6 +217,10 @@ func (_c *mockServiceInterface_Create_Call) RunAndReturn(run func(context.Contex func (_m *mockServiceInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -249,6 +265,10 @@ func (_c *mockServiceInterface_Delete_Call) RunAndReturn(run func(context.Contex func (_m *mockServiceInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Service, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*corev1.Service, error)); ok { @@ -305,6 +325,10 @@ func (_c *mockServiceInterface_Get_Call) RunAndReturn(run func(context.Context, func (_m *mockServiceInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.ServiceList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *corev1.ServiceList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*corev1.ServiceList, error)); ok { @@ -367,6 +391,10 @@ func (_m *mockServiceInterface) Patch(ctx context.Context, name string, pt types _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.Service, error)); ok { @@ -433,6 +461,10 @@ func (_c *mockServiceInterface_Patch_Call) RunAndReturn(run func(context.Context func (_m *mockServiceInterface) ProxyGet(scheme string, name string, port string, path string, params map[string]string) rest.ResponseWrapper { ret := _m.Called(scheme, name, port, path, params) + if len(ret) == 0 { + panic("no return value specified for ProxyGet") + } + var r0 rest.ResponseWrapper if rf, ok := ret.Get(0).(func(string, string, string, string, map[string]string) rest.ResponseWrapper); ok { r0 = rf(scheme, name, port, path, params) @@ -481,6 +513,10 @@ func (_c *mockServiceInterface_ProxyGet_Call) RunAndReturn(run func(string, stri func (_m *mockServiceInterface) Update(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)); ok { @@ -537,6 +573,10 @@ func (_c *mockServiceInterface_Update_Call) RunAndReturn(run func(context.Contex func (_m *mockServiceInterface) UpdateStatus(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) { ret := _m.Called(ctx, service, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *corev1.Service var r1 error if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)); ok { @@ -593,6 +633,10 @@ func (_c *mockServiceInterface_UpdateStatus_Call) RunAndReturn(run func(context. func (_m *mockServiceInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -644,13 +688,12 @@ func (_c *mockServiceInterface_Watch_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTnewMockServiceInterface interface { +// newMockServiceInterface creates a new instance of mockServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockServiceInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockServiceInterface creates a new instance of mockServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockServiceInterface(t mockConstructorTestingTnewMockServiceInterface) *mockServiceInterface { +}) *mockServiceInterface { mock := &mockServiceInterface{} mock.Mock.Test(t) diff --git a/pkg/restore/mock_statefulSetInterface_test.go b/pkg/restore/mock_statefulSetInterface_test.go index de81585..541d5a1 100644 --- a/pkg/restore/mock_statefulSetInterface_test.go +++ b/pkg/restore/mock_statefulSetInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package restore @@ -38,6 +38,10 @@ func (_m *mockStatefulSetInterface) EXPECT() *mockStatefulSetInterface_Expecter func (_m *mockStatefulSetInterface) Apply(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for Apply") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)); ok { @@ -94,6 +98,10 @@ func (_c *mockStatefulSetInterface_Apply_Call) RunAndReturn(run func(context.Con func (_m *mockStatefulSetInterface) ApplyScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.ScaleApplyConfiguration, opts metav1.ApplyOptions) (*apiautoscalingv1.Scale, error) { ret := _m.Called(ctx, statefulSetName, scale, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyScale") + } + var r0 *apiautoscalingv1.Scale var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *autoscalingv1.ScaleApplyConfiguration, metav1.ApplyOptions) (*apiautoscalingv1.Scale, error)); ok { @@ -151,6 +159,10 @@ func (_c *mockStatefulSetInterface_ApplyScale_Call) RunAndReturn(run func(contex func (_m *mockStatefulSetInterface) ApplyStatus(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for ApplyStatus") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)); ok { @@ -207,6 +219,10 @@ func (_c *mockStatefulSetInterface_ApplyStatus_Call) RunAndReturn(run func(conte func (_m *mockStatefulSetInterface) Create(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.CreateOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.CreateOptions) (*appsv1.StatefulSet, error)); ok { @@ -263,6 +279,10 @@ func (_c *mockStatefulSetInterface_Create_Call) RunAndReturn(run func(context.Co func (_m *mockStatefulSetInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -307,6 +327,10 @@ func (_c *mockStatefulSetInterface_Delete_Call) RunAndReturn(run func(context.Co func (_m *mockStatefulSetInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -351,6 +375,10 @@ func (_c *mockStatefulSetInterface_DeleteCollection_Call) RunAndReturn(run func( func (_m *mockStatefulSetInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*appsv1.StatefulSet, error)); ok { @@ -407,6 +435,10 @@ func (_c *mockStatefulSetInterface_Get_Call) RunAndReturn(run func(context.Conte func (_m *mockStatefulSetInterface) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*apiautoscalingv1.Scale, error) { ret := _m.Called(ctx, statefulSetName, options) + if len(ret) == 0 { + panic("no return value specified for GetScale") + } + var r0 *apiautoscalingv1.Scale var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*apiautoscalingv1.Scale, error)); ok { @@ -463,6 +495,10 @@ func (_c *mockStatefulSetInterface_GetScale_Call) RunAndReturn(run func(context. func (_m *mockStatefulSetInterface) List(ctx context.Context, opts metav1.ListOptions) (*appsv1.StatefulSetList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *appsv1.StatefulSetList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*appsv1.StatefulSetList, error)); ok { @@ -525,6 +561,10 @@ func (_m *mockStatefulSetInterface) Patch(ctx context.Context, name string, pt t _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*appsv1.StatefulSet, error)); ok { @@ -591,6 +631,10 @@ func (_c *mockStatefulSetInterface_Patch_Call) RunAndReturn(run func(context.Con func (_m *mockStatefulSetInterface) Update(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)); ok { @@ -647,6 +691,10 @@ func (_c *mockStatefulSetInterface_Update_Call) RunAndReturn(run func(context.Co func (_m *mockStatefulSetInterface) UpdateScale(ctx context.Context, statefulSetName string, scale *apiautoscalingv1.Scale, opts metav1.UpdateOptions) (*apiautoscalingv1.Scale, error) { ret := _m.Called(ctx, statefulSetName, scale, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateScale") + } + var r0 *apiautoscalingv1.Scale var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *apiautoscalingv1.Scale, metav1.UpdateOptions) (*apiautoscalingv1.Scale, error)); ok { @@ -704,6 +752,10 @@ func (_c *mockStatefulSetInterface_UpdateScale_Call) RunAndReturn(run func(conte func (_m *mockStatefulSetInterface) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions) (*appsv1.StatefulSet, error) { ret := _m.Called(ctx, statefulSet, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *appsv1.StatefulSet var r1 error if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)); ok { @@ -760,6 +812,10 @@ func (_c *mockStatefulSetInterface_UpdateStatus_Call) RunAndReturn(run func(cont func (_m *mockStatefulSetInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -811,13 +867,12 @@ func (_c *mockStatefulSetInterface_Watch_Call) RunAndReturn(run func(context.Con return _c } -type mockConstructorTestingTnewMockStatefulSetInterface interface { +// newMockStatefulSetInterface creates a new instance of mockStatefulSetInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockStatefulSetInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockStatefulSetInterface creates a new instance of mockStatefulSetInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockStatefulSetInterface(t mockConstructorTestingTnewMockStatefulSetInterface) *mockStatefulSetInterface { +}) *mockStatefulSetInterface { mock := &mockStatefulSetInterface{} mock.Mock.Test(t) diff --git a/pkg/retention/mock_Strategy_test.go b/pkg/retention/mock_Strategy_test.go index 7ceb177..0b57009 100644 --- a/pkg/retention/mock_Strategy_test.go +++ b/pkg/retention/mock_Strategy_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package retention @@ -24,6 +24,10 @@ func (_m *MockStrategy) EXPECT() *MockStrategy_Expecter { func (_m *MockStrategy) FilterForRemoval(allBackups []v1.Backup) (RemovedBackups, RetainedBackups) { ret := _m.Called(allBackups) + if len(ret) == 0 { + panic("no return value specified for FilterForRemoval") + } + var r0 RemovedBackups var r1 RetainedBackups if rf, ok := ret.Get(0).(func([]v1.Backup) (RemovedBackups, RetainedBackups)); ok { @@ -80,6 +84,10 @@ func (_c *MockStrategy_FilterForRemoval_Call) RunAndReturn(run func([]v1.Backup) func (_m *MockStrategy) GetName() StrategyId { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetName") + } + var r0 StrategyId if rf, ok := ret.Get(0).(func() StrategyId); ok { r0 = rf() @@ -117,13 +125,12 @@ func (_c *MockStrategy_GetName_Call) RunAndReturn(run func() StrategyId) *MockSt return _c } -type mockConstructorTestingTNewMockStrategy interface { +// NewMockStrategy creates a new instance of MockStrategy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockStrategy(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockStrategy creates a new instance of MockStrategy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockStrategy(t mockConstructorTestingTNewMockStrategy) *MockStrategy { +}) *MockStrategy { mock := &MockStrategy{} mock.Mock.Test(t) diff --git a/pkg/retention/mock_timeProvider_test.go b/pkg/retention/mock_timeProvider_test.go index 105da5a..6c880e9 100644 --- a/pkg/retention/mock_timeProvider_test.go +++ b/pkg/retention/mock_timeProvider_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package retention @@ -25,6 +25,10 @@ func (_m *mockTimeProvider) EXPECT() *mockTimeProvider_Expecter { func (_m *mockTimeProvider) Now() time.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Now") + } + var r0 time.Time if rf, ok := ret.Get(0).(func() time.Time); ok { r0 = rf() @@ -62,13 +66,12 @@ func (_c *mockTimeProvider_Now_Call) RunAndReturn(run func() time.Time) *mockTim return _c } -type mockConstructorTestingTnewMockTimeProvider interface { +// newMockTimeProvider creates a new instance of mockTimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockTimeProvider(t interface { mock.TestingT Cleanup(func()) -} - -// newMockTimeProvider creates a new instance of mockTimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockTimeProvider(t mockConstructorTestingTnewMockTimeProvider) *mockTimeProvider { +}) *mockTimeProvider { mock := &mockTimeProvider{} mock.Mock.Test(t) diff --git a/pkg/scheduledbackup/mock_Manager_test.go b/pkg/scheduledbackup/mock_Manager_test.go index e77d330..36f3d59 100644 --- a/pkg/scheduledbackup/mock_Manager_test.go +++ b/pkg/scheduledbackup/mock_Manager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package scheduledbackup @@ -25,6 +25,10 @@ func (_m *MockManager) EXPECT() *MockManager_Expecter { func (_m *MockManager) ScheduleBackup(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ScheduleBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -63,13 +67,12 @@ func (_c *MockManager_ScheduleBackup_Call) RunAndReturn(run func(context.Context return _c } -type mockConstructorTestingTNewMockManager interface { +// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager { +}) *MockManager { mock := &MockManager{} mock.Mock.Test(t) diff --git a/pkg/scheduledbackup/mock_ecosystemBackupInterface_test.go b/pkg/scheduledbackup/mock_ecosystemBackupInterface_test.go index 2645c2b..4dcda3a 100644 --- a/pkg/scheduledbackup/mock_ecosystemBackupInterface_test.go +++ b/pkg/scheduledbackup/mock_ecosystemBackupInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package scheduledbackup @@ -32,6 +32,10 @@ func (_m *mockEcosystemBackupInterface) EXPECT() *mockEcosystemBackupInterface_E func (_m *mockEcosystemBackupInterface) AddFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemBackupInterface_AddFinalizer_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) AddLabels(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemBackupInterface_AddLabels_Call) RunAndReturn(run func(con func (_m *mockEcosystemBackupInterface) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemBackupInterface_Create_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemBackupInterface_Delete_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemBackupInterface_DeleteCollection_Call) RunAndReturn(run f func (_m *mockEcosystemBackupInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemBackupInterface_Get_Call) RunAndReturn(run func(context.C func (_m *mockEcosystemBackupInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemBackupInterface) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemBackupInterface_Patch_Call) RunAndReturn(run func(context func (_m *mockEcosystemBackupInterface) RemoveFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemBackupInterface_RemoveFinalizer_Call) RunAndReturn(run fu func (_m *mockEcosystemBackupInterface) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemBackupInterface_Update_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatus_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) UpdateStatusCompleted(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusCompleted_Call) RunAndReturn( func (_m *mockEcosystemBackupInterface) UpdateStatusDeleting(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusDeleting_Call) RunAndReturn(r func (_m *mockEcosystemBackupInterface) UpdateStatusFailed(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusFailed_Call) RunAndReturn(run func (_m *mockEcosystemBackupInterface) UpdateStatusInProgress(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusInProgress_Call) RunAndReturn func (_m *mockEcosystemBackupInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockEcosystemBackupInterface_Watch_Call) RunAndReturn(run func(context return _c } -type mockConstructorTestingTnewMockEcosystemBackupInterface interface { +// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemBackupInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemBackupInterface(t mockConstructorTestingTnewMockEcosystemBackupInterface) *mockEcosystemBackupInterface { +}) *mockEcosystemBackupInterface { mock := &mockEcosystemBackupInterface{} mock.Mock.Test(t) diff --git a/pkg/scheduledbackup/mock_ecosystemClientSet_test.go b/pkg/scheduledbackup/mock_ecosystemClientSet_test.go index 7fd4d85..79680ac 100644 --- a/pkg/scheduledbackup/mock_ecosystemClientSet_test.go +++ b/pkg/scheduledbackup/mock_ecosystemClientSet_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package scheduledbackup @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemClientSet) EXPECT() *mockEcosystemClientSet_Expecter { func (_m *mockEcosystemClientSet) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemClientSet) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemClientSet) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemClientSet) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemClientSet_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemClientSet) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemClientSet) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemClientSet) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemClientSet) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemClientSet) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemClientSet) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemClientSet) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemClientSet) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemClientSet_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemClientSet) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemClientSet_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemClientSet) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemClientSet) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemClientSet_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemClientSet_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) CoordinationV1alpha1() *mockEcosystemClientSet_CoordinationV1alpha1_Call { + return &mockEcosystemClientSet_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemClientSet) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemClientSet_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemClientSet_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemClientSet) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemClientSet_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemClientSet) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemClientSet) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemClientSet_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemClientSet_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemClientSet) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemClientSet_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemClientSet) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemClientSet_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemClientSet_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemClientSet_FlowcontrolV1alpha1_Call struct { +// mockEcosystemClientSet_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemClientSet_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1alpha1() *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { - return &mockEcosystemClientSet_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1() *mockEcosystemClientSet_FlowcontrolV1_Call { + return &mockEcosystemClientSet_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemClientSet_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemClientSet) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemClientSet_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemClientSet) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemClientSet_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemClientSet) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemClientSet_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemClientSet) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemClientSet_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemClientSet) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemClientSet_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemClientSet) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemClientSet_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemClientSet) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemClientSet_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemClientSet) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemClientSet_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemClientSet_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemClientSet_ResourceV1alpha2_Call struct { +// mockEcosystemClientSet_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemClientSet_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha2() *mockEcosystemClientSet_ResourceV1alpha2_Call { - return &mockEcosystemClientSet_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha3() *mockEcosystemClientSet_ResourceV1alpha3_Call { + return &mockEcosystemClientSet_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemClientSet) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemClientSet_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemClientSet) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemClientSet_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemClientSet) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemClientSet_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemClientSet interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemClientSet_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) StoragemigrationV1alpha1() *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + return &mockEcosystemClientSet_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemClientSet creates a new instance of mockEcosystemClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemClientSet(t mockConstructorTestingTnewMockEcosystemClientSet) *mockEcosystemClientSet { +// The first argument is typically a *testing.T value. +func newMockEcosystemClientSet(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemClientSet { mock := &mockEcosystemClientSet{} mock.Mock.Test(t) diff --git a/pkg/scheduledbackup/mock_ecosystemV1Alpha1Interface_test.go b/pkg/scheduledbackup/mock_ecosystemV1Alpha1Interface_test.go index 3021b1b..3b0f7aa 100644 --- a/pkg/scheduledbackup/mock_ecosystemV1Alpha1Interface_test.go +++ b/pkg/scheduledbackup/mock_ecosystemV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package scheduledbackup @@ -24,6 +24,10 @@ func (_m *mockEcosystemV1Alpha1Interface) EXPECT() *mockEcosystemV1Alpha1Interfa func (_m *mockEcosystemV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockEcosystemV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run func (_m *mockEcosystemV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockEcosystemV1Alpha1Interface_Backups_Call) RunAndReturn(run func(str func (_m *mockEcosystemV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockEcosystemV1Alpha1Interface_Restores_Call) RunAndReturn(run func(st return _c } -type mockConstructorTestingTnewMockEcosystemV1Alpha1Interface interface { +// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemV1Alpha1Interface(t mockConstructorTestingTnewMockEcosystemV1Alpha1Interface) *mockEcosystemV1Alpha1Interface { +}) *mockEcosystemV1Alpha1Interface { mock := &mockEcosystemV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/scheduledbackup/mock_timeProvider_test.go b/pkg/scheduledbackup/mock_timeProvider_test.go index 89b9f4b..e598fb3 100644 --- a/pkg/scheduledbackup/mock_timeProvider_test.go +++ b/pkg/scheduledbackup/mock_timeProvider_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package scheduledbackup @@ -25,6 +25,10 @@ func (_m *mockTimeProvider) EXPECT() *mockTimeProvider_Expecter { func (_m *mockTimeProvider) Now() time.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Now") + } + var r0 time.Time if rf, ok := ret.Get(0).(func() time.Time); ok { r0 = rf() @@ -62,13 +66,12 @@ func (_c *mockTimeProvider_Now_Call) RunAndReturn(run func() time.Time) *mockTim return _c } -type mockConstructorTestingTnewMockTimeProvider interface { +// newMockTimeProvider creates a new instance of mockTimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockTimeProvider(t interface { mock.TestingT Cleanup(func()) -} - -// newMockTimeProvider creates a new instance of mockTimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockTimeProvider(t mockConstructorTestingTnewMockTimeProvider) *mockTimeProvider { +}) *mockTimeProvider { mock := &mockTimeProvider{} mock.Mock.Test(t) diff --git a/pkg/time/mock_TimeProvider_test.go b/pkg/time/mock_TimeProvider_test.go index 67dd465..5371d2f 100644 --- a/pkg/time/mock_TimeProvider_test.go +++ b/pkg/time/mock_TimeProvider_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package time @@ -25,6 +25,10 @@ func (_m *MockTimeProvider) EXPECT() *MockTimeProvider_Expecter { func (_m *MockTimeProvider) Now() time2.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Now") + } + var r0 time2.Time if rf, ok := ret.Get(0).(func() time2.Time); ok { r0 = rf() @@ -62,13 +66,12 @@ func (_c *MockTimeProvider_Now_Call) RunAndReturn(run func() time2.Time) *MockTi return _c } -type mockConstructorTestingTNewMockTimeProvider interface { +// NewMockTimeProvider creates a new instance of MockTimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockTimeProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewMockTimeProvider creates a new instance of MockTimeProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockTimeProvider(t mockConstructorTestingTNewMockTimeProvider) *MockTimeProvider { +}) *MockTimeProvider { mock := &MockTimeProvider{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_backupManager_test.go b/pkg/velero/mock_backupManager_test.go index 235a939..4eb5bf0 100644 --- a/pkg/velero/mock_backupManager_test.go +++ b/pkg/velero/mock_backupManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -26,6 +26,10 @@ func (_m *mockBackupManager) EXPECT() *mockBackupManager_Expecter { func (_m *mockBackupManager) CreateBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for CreateBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -69,6 +73,10 @@ func (_c *mockBackupManager_CreateBackup_Call) RunAndReturn(run func(context.Con func (_m *mockBackupManager) DeleteBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for DeleteBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -108,13 +116,12 @@ func (_c *mockBackupManager_DeleteBackup_Call) RunAndReturn(run func(context.Con return _c } -type mockConstructorTestingTnewMockBackupManager interface { +// newMockBackupManager creates a new instance of mockBackupManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockBackupManager creates a new instance of mockBackupManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockBackupManager(t mockConstructorTestingTnewMockBackupManager) *mockBackupManager { +}) *mockBackupManager { mock := &mockBackupManager{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_ecosystemBackupInterface_test.go b/pkg/velero/mock_ecosystemBackupInterface_test.go index 5ce131a..6674ef5 100644 --- a/pkg/velero/mock_ecosystemBackupInterface_test.go +++ b/pkg/velero/mock_ecosystemBackupInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -32,6 +32,10 @@ func (_m *mockEcosystemBackupInterface) EXPECT() *mockEcosystemBackupInterface_E func (_m *mockEcosystemBackupInterface) AddFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for AddFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockEcosystemBackupInterface_AddFinalizer_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) AddLabels(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for AddLabels") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -143,6 +151,10 @@ func (_c *mockEcosystemBackupInterface_AddLabels_Call) RunAndReturn(run func(con func (_m *mockEcosystemBackupInterface) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -199,6 +211,10 @@ func (_c *mockEcosystemBackupInterface_Create_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -243,6 +259,10 @@ func (_c *mockEcosystemBackupInterface_Delete_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -287,6 +307,10 @@ func (_c *mockEcosystemBackupInterface_DeleteCollection_Call) RunAndReturn(run f func (_m *mockEcosystemBackupInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -343,6 +367,10 @@ func (_c *mockEcosystemBackupInterface_Get_Call) RunAndReturn(run func(context.C func (_m *mockEcosystemBackupInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -405,6 +433,10 @@ func (_m *mockEcosystemBackupInterface) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -471,6 +503,10 @@ func (_c *mockEcosystemBackupInterface_Patch_Call) RunAndReturn(run func(context func (_m *mockEcosystemBackupInterface) RemoveFinalizer(ctx context.Context, backup *v1.Backup, finalizer string) (*v1.Backup, error) { ret := _m.Called(ctx, backup, finalizer) + if len(ret) == 0 { + panic("no return value specified for RemoveFinalizer") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, string) (*v1.Backup, error)); ok { @@ -527,6 +563,10 @@ func (_c *mockEcosystemBackupInterface_RemoveFinalizer_Call) RunAndReturn(run fu func (_m *mockEcosystemBackupInterface) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -583,6 +623,10 @@ func (_c *mockEcosystemBackupInterface_Update_Call) RunAndReturn(run func(contex func (_m *mockEcosystemBackupInterface) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -639,6 +683,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatus_Call) RunAndReturn(run func( func (_m *mockEcosystemBackupInterface) UpdateStatusCompleted(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusCompleted") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -694,6 +742,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusCompleted_Call) RunAndReturn( func (_m *mockEcosystemBackupInterface) UpdateStatusDeleting(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusDeleting") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -749,6 +801,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusDeleting_Call) RunAndReturn(r func (_m *mockEcosystemBackupInterface) UpdateStatusFailed(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusFailed") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -804,6 +860,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusFailed_Call) RunAndReturn(run func (_m *mockEcosystemBackupInterface) UpdateStatusInProgress(ctx context.Context, backup *v1.Backup) (*v1.Backup, error) { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for UpdateStatusInProgress") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) (*v1.Backup, error)); ok { @@ -859,6 +919,10 @@ func (_c *mockEcosystemBackupInterface_UpdateStatusInProgress_Call) RunAndReturn func (_m *mockEcosystemBackupInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -910,13 +974,12 @@ func (_c *mockEcosystemBackupInterface_Watch_Call) RunAndReturn(run func(context return _c } -type mockConstructorTestingTnewMockEcosystemBackupInterface interface { +// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemBackupInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemBackupInterface creates a new instance of mockEcosystemBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemBackupInterface(t mockConstructorTestingTnewMockEcosystemBackupInterface) *mockEcosystemBackupInterface { +}) *mockEcosystemBackupInterface { mock := &mockEcosystemBackupInterface{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_ecosystemClientSet_test.go b/pkg/velero/mock_ecosystemClientSet_test.go index deebefa..e1c11e2 100644 --- a/pkg/velero/mock_ecosystemClientSet_test.go +++ b/pkg/velero/mock_ecosystemClientSet_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -32,6 +32,8 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" + coordinationv1alpha1 "k8s.io/client-go/kubernetes/typed/coordination/v1alpha1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -50,7 +52,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" @@ -86,6 +88,8 @@ import ( schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -96,7 +100,7 @@ import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" v1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -128,6 +132,10 @@ func (_m *mockEcosystemClientSet) EXPECT() *mockEcosystemClientSet_Expecter { func (_m *mockEcosystemClientSet) AdmissionregistrationV1() v1.AdmissionregistrationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1") + } + var r0 v1.AdmissionregistrationV1Interface if rf, ok := ret.Get(0).(func() v1.AdmissionregistrationV1Interface); ok { r0 = rf() @@ -171,6 +179,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1_Call) RunAndReturn(run func (_m *mockEcosystemClientSet) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1alpha1") + } + var r0 v1alpha1.AdmissionregistrationV1alpha1Interface if rf, ok := ret.Get(0).(func() v1alpha1.AdmissionregistrationV1alpha1Interface); ok { r0 = rf() @@ -214,6 +226,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1alpha1_Call) RunAndRetur func (_m *mockEcosystemClientSet) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AdmissionregistrationV1beta1") + } + var r0 v1beta1.AdmissionregistrationV1beta1Interface if rf, ok := ret.Get(0).(func() v1beta1.AdmissionregistrationV1beta1Interface); ok { r0 = rf() @@ -257,6 +273,10 @@ func (_c *mockEcosystemClientSet_AdmissionregistrationV1beta1_Call) RunAndReturn func (_m *mockEcosystemClientSet) AppsV1() appsv1.AppsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1") + } + var r0 appsv1.AppsV1Interface if rf, ok := ret.Get(0).(func() appsv1.AppsV1Interface); ok { r0 = rf() @@ -300,6 +320,10 @@ func (_c *mockEcosystemClientSet_AppsV1_Call) RunAndReturn(run func() appsv1.App func (_m *mockEcosystemClientSet) AppsV1beta1() appsv1beta1.AppsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta1") + } + var r0 appsv1beta1.AppsV1beta1Interface if rf, ok := ret.Get(0).(func() appsv1beta1.AppsV1beta1Interface); ok { r0 = rf() @@ -343,6 +367,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta1_Call) RunAndReturn(run func() appsv func (_m *mockEcosystemClientSet) AppsV1beta2() v1beta2.AppsV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AppsV1beta2") + } + var r0 v1beta2.AppsV1beta2Interface if rf, ok := ret.Get(0).(func() v1beta2.AppsV1beta2Interface); ok { r0 = rf() @@ -386,6 +414,10 @@ func (_c *mockEcosystemClientSet_AppsV1beta2_Call) RunAndReturn(run func() v1bet func (_m *mockEcosystemClientSet) AuthenticationV1() authenticationv1.AuthenticationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1") + } + var r0 authenticationv1.AuthenticationV1Interface if rf, ok := ret.Get(0).(func() authenticationv1.AuthenticationV1Interface); ok { r0 = rf() @@ -429,6 +461,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1alpha1") + } + var r0 authenticationv1alpha1.AuthenticationV1alpha1Interface if rf, ok := ret.Get(0).(func() authenticationv1alpha1.AuthenticationV1alpha1Interface); ok { r0 = rf() @@ -472,6 +508,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1alpha1_Call) RunAndReturn(run f func (_m *mockEcosystemClientSet) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthenticationV1beta1") + } + var r0 authenticationv1beta1.AuthenticationV1beta1Interface if rf, ok := ret.Get(0).(func() authenticationv1beta1.AuthenticationV1beta1Interface); ok { r0 = rf() @@ -515,6 +555,10 @@ func (_c *mockEcosystemClientSet_AuthenticationV1beta1_Call) RunAndReturn(run fu func (_m *mockEcosystemClientSet) AuthorizationV1() authorizationv1.AuthorizationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1") + } + var r0 authorizationv1.AuthorizationV1Interface if rf, ok := ret.Get(0).(func() authorizationv1.AuthorizationV1Interface); ok { r0 = rf() @@ -558,6 +602,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1_Call) RunAndReturn(run func() a func (_m *mockEcosystemClientSet) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AuthorizationV1beta1") + } + var r0 authorizationv1beta1.AuthorizationV1beta1Interface if rf, ok := ret.Get(0).(func() authorizationv1beta1.AuthorizationV1beta1Interface); ok { r0 = rf() @@ -601,6 +649,10 @@ func (_c *mockEcosystemClientSet_AuthorizationV1beta1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV1") + } + var r0 autoscalingv1.AutoscalingV1Interface if rf, ok := ret.Get(0).(func() autoscalingv1.AutoscalingV1Interface); ok { r0 = rf() @@ -644,6 +696,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV1_Call) RunAndReturn(run func() aut func (_m *mockEcosystemClientSet) AutoscalingV2() v2.AutoscalingV2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2") + } + var r0 v2.AutoscalingV2Interface if rf, ok := ret.Get(0).(func() v2.AutoscalingV2Interface); ok { r0 = rf() @@ -687,6 +743,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2_Call) RunAndReturn(run func() v2. func (_m *mockEcosystemClientSet) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta1") + } + var r0 v2beta1.AutoscalingV2beta1Interface if rf, ok := ret.Get(0).(func() v2beta1.AutoscalingV2beta1Interface); ok { r0 = rf() @@ -730,6 +790,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AutoscalingV2beta2") + } + var r0 v2beta2.AutoscalingV2beta2Interface if rf, ok := ret.Get(0).(func() v2beta2.AutoscalingV2beta2Interface); ok { r0 = rf() @@ -773,6 +837,10 @@ func (_c *mockEcosystemClientSet_AutoscalingV2beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) BatchV1() batchv1.BatchV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1") + } + var r0 batchv1.BatchV1Interface if rf, ok := ret.Get(0).(func() batchv1.BatchV1Interface); ok { r0 = rf() @@ -816,6 +884,10 @@ func (_c *mockEcosystemClientSet_BatchV1_Call) RunAndReturn(run func() batchv1.B func (_m *mockEcosystemClientSet) BatchV1beta1() batchv1beta1.BatchV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchV1beta1") + } + var r0 batchv1beta1.BatchV1beta1Interface if rf, ok := ret.Get(0).(func() batchv1beta1.BatchV1beta1Interface); ok { r0 = rf() @@ -859,6 +931,10 @@ func (_c *mockEcosystemClientSet_BatchV1beta1_Call) RunAndReturn(run func() batc func (_m *mockEcosystemClientSet) CertificatesV1() certificatesv1.CertificatesV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1") + } + var r0 certificatesv1.CertificatesV1Interface if rf, ok := ret.Get(0).(func() certificatesv1.CertificatesV1Interface); ok { r0 = rf() @@ -902,6 +978,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1_Call) RunAndReturn(run func() ce func (_m *mockEcosystemClientSet) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1alpha1") + } + var r0 certificatesv1alpha1.CertificatesV1alpha1Interface if rf, ok := ret.Get(0).(func() certificatesv1alpha1.CertificatesV1alpha1Interface); ok { r0 = rf() @@ -945,6 +1025,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1alpha1_Call) RunAndReturn(run fun func (_m *mockEcosystemClientSet) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CertificatesV1beta1") + } + var r0 certificatesv1beta1.CertificatesV1beta1Interface if rf, ok := ret.Get(0).(func() certificatesv1beta1.CertificatesV1beta1Interface); ok { r0 = rf() @@ -988,6 +1072,10 @@ func (_c *mockEcosystemClientSet_CertificatesV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoordinationV1() coordinationv1.CoordinationV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1") + } + var r0 coordinationv1.CoordinationV1Interface if rf, ok := ret.Get(0).(func() coordinationv1.CoordinationV1Interface); ok { r0 = rf() @@ -1027,10 +1115,61 @@ func (_c *mockEcosystemClientSet_CoordinationV1_Call) RunAndReturn(run func() co return _c } +// CoordinationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) CoordinationV1alpha1() coordinationv1alpha1.CoordinationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoordinationV1alpha1") + } + + var r0 coordinationv1alpha1.CoordinationV1alpha1Interface + if rf, ok := ret.Get(0).(func() coordinationv1alpha1.CoordinationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(coordinationv1alpha1.CoordinationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_CoordinationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoordinationV1alpha1' +type mockEcosystemClientSet_CoordinationV1alpha1_Call struct { + *mock.Call +} + +// CoordinationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) CoordinationV1alpha1() *mockEcosystemClientSet_CoordinationV1alpha1_Call { + return &mockEcosystemClientSet_CoordinationV1alpha1_Call{Call: _e.mock.On("CoordinationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) Return(_a0 coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_CoordinationV1alpha1_Call) RunAndReturn(run func() coordinationv1alpha1.CoordinationV1alpha1Interface) *mockEcosystemClientSet_CoordinationV1alpha1_Call { + _c.Call.Return(run) + return _c +} + // CoordinationV1beta1 provides a mock function with given fields: func (_m *mockEcosystemClientSet) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoordinationV1beta1") + } + var r0 coordinationv1beta1.CoordinationV1beta1Interface if rf, ok := ret.Get(0).(func() coordinationv1beta1.CoordinationV1beta1Interface); ok { r0 = rf() @@ -1074,6 +1213,10 @@ func (_c *mockEcosystemClientSet_CoordinationV1beta1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) CoreV1() corev1.CoreV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreV1") + } + var r0 corev1.CoreV1Interface if rf, ok := ret.Get(0).(func() corev1.CoreV1Interface); ok { r0 = rf() @@ -1117,6 +1260,10 @@ func (_c *mockEcosystemClientSet_CoreV1_Call) RunAndReturn(run func() corev1.Cor func (_m *mockEcosystemClientSet) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -1160,6 +1307,10 @@ func (_c *mockEcosystemClientSet_Discovery_Call) RunAndReturn(run func() discove func (_m *mockEcosystemClientSet) DiscoveryV1() discoveryv1.DiscoveryV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1") + } + var r0 discoveryv1.DiscoveryV1Interface if rf, ok := ret.Get(0).(func() discoveryv1.DiscoveryV1Interface); ok { r0 = rf() @@ -1203,6 +1354,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1_Call) RunAndReturn(run func() disco func (_m *mockEcosystemClientSet) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DiscoveryV1beta1") + } + var r0 discoveryv1beta1.DiscoveryV1beta1Interface if rf, ok := ret.Get(0).(func() discoveryv1beta1.DiscoveryV1beta1Interface); ok { r0 = rf() @@ -1246,6 +1401,10 @@ func (_c *mockEcosystemClientSet_DiscoveryV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EcosystemV1Alpha1() ecosystem.V1Alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EcosystemV1Alpha1") + } + var r0 ecosystem.V1Alpha1Interface if rf, ok := ret.Get(0).(func() ecosystem.V1Alpha1Interface); ok { r0 = rf() @@ -1289,6 +1448,10 @@ func (_c *mockEcosystemClientSet_EcosystemV1Alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) EventsV1() eventsv1.EventsV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1") + } + var r0 eventsv1.EventsV1Interface if rf, ok := ret.Get(0).(func() eventsv1.EventsV1Interface); ok { r0 = rf() @@ -1332,6 +1495,10 @@ func (_c *mockEcosystemClientSet_EventsV1_Call) RunAndReturn(run func() eventsv1 func (_m *mockEcosystemClientSet) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventsV1beta1") + } + var r0 eventsv1beta1.EventsV1beta1Interface if rf, ok := ret.Get(0).(func() eventsv1beta1.EventsV1beta1Interface); ok { r0 = rf() @@ -1375,6 +1542,10 @@ func (_c *mockEcosystemClientSet_EventsV1beta1_Call) RunAndReturn(run func() eve func (_m *mockEcosystemClientSet) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExtensionsV1beta1") + } + var r0 extensionsv1beta1.ExtensionsV1beta1Interface if rf, ok := ret.Get(0).(func() extensionsv1beta1.ExtensionsV1beta1Interface); ok { r0 = rf() @@ -1414,45 +1585,49 @@ func (_c *mockEcosystemClientSet_ExtensionsV1beta1_Call) RunAndReturn(run func() return _c } -// FlowcontrolV1alpha1 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +// FlowcontrolV1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { ret := _m.Called() - var r0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface - if rf, ok := ret.Get(0).(func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface); ok { + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1") + } + + var r0 flowcontrolv1.FlowcontrolV1Interface + if rf, ok := ret.Get(0).(func() flowcontrolv1.FlowcontrolV1Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) + r0 = ret.Get(0).(flowcontrolv1.FlowcontrolV1Interface) } } return r0 } -// mockEcosystemClientSet_FlowcontrolV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1alpha1' -type mockEcosystemClientSet_FlowcontrolV1alpha1_Call struct { +// mockEcosystemClientSet_FlowcontrolV1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlowcontrolV1' +type mockEcosystemClientSet_FlowcontrolV1_Call struct { *mock.Call } -// FlowcontrolV1alpha1 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1alpha1() *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { - return &mockEcosystemClientSet_FlowcontrolV1alpha1_Call{Call: _e.mock.On("FlowcontrolV1alpha1")} +// FlowcontrolV1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) FlowcontrolV1() *mockEcosystemClientSet_FlowcontrolV1_Call { + return &mockEcosystemClientSet_FlowcontrolV1_Call{Call: _e.mock.On("FlowcontrolV1")} } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Run(run func()) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) Return(_a0 flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) Return(_a0 flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface) *mockEcosystemClientSet_FlowcontrolV1alpha1_Call { +func (_c *mockEcosystemClientSet_FlowcontrolV1_Call) RunAndReturn(run func() flowcontrolv1.FlowcontrolV1Interface) *mockEcosystemClientSet_FlowcontrolV1_Call { _c.Call.Return(run) return _c } @@ -1461,6 +1636,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1alpha1_Call) RunAndReturn(run func func (_m *mockEcosystemClientSet) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta1") + } + var r0 flowcontrolv1beta1.FlowcontrolV1beta1Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta1.FlowcontrolV1beta1Interface); ok { r0 = rf() @@ -1504,6 +1683,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta2") + } + var r0 flowcontrolv1beta2.FlowcontrolV1beta2Interface if rf, ok := ret.Get(0).(func() flowcontrolv1beta2.FlowcontrolV1beta2Interface); ok { r0 = rf() @@ -1547,6 +1730,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta2_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlowcontrolV1beta3") + } + var r0 v1beta3.FlowcontrolV1beta3Interface if rf, ok := ret.Get(0).(func() v1beta3.FlowcontrolV1beta3Interface); ok { r0 = rf() @@ -1590,6 +1777,10 @@ func (_c *mockEcosystemClientSet_FlowcontrolV1beta3_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) InternalV1alpha1() apiserverinternalv1alpha1.InternalV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InternalV1alpha1") + } + var r0 apiserverinternalv1alpha1.InternalV1alpha1Interface if rf, ok := ret.Get(0).(func() apiserverinternalv1alpha1.InternalV1alpha1Interface); ok { r0 = rf() @@ -1633,6 +1824,10 @@ func (_c *mockEcosystemClientSet_InternalV1alpha1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NetworkingV1() networkingv1.NetworkingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1") + } + var r0 networkingv1.NetworkingV1Interface if rf, ok := ret.Get(0).(func() networkingv1.NetworkingV1Interface); ok { r0 = rf() @@ -1676,6 +1871,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1_Call) RunAndReturn(run func() netw func (_m *mockEcosystemClientSet) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1alpha1") + } + var r0 networkingv1alpha1.NetworkingV1alpha1Interface if rf, ok := ret.Get(0).(func() networkingv1alpha1.NetworkingV1alpha1Interface); ok { r0 = rf() @@ -1719,6 +1918,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkingV1beta1") + } + var r0 networkingv1beta1.NetworkingV1beta1Interface if rf, ok := ret.Get(0).(func() networkingv1beta1.NetworkingV1beta1Interface); ok { r0 = rf() @@ -1762,6 +1965,10 @@ func (_c *mockEcosystemClientSet_NetworkingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) NodeV1() nodev1.NodeV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1") + } + var r0 nodev1.NodeV1Interface if rf, ok := ret.Get(0).(func() nodev1.NodeV1Interface); ok { r0 = rf() @@ -1805,6 +2012,10 @@ func (_c *mockEcosystemClientSet_NodeV1_Call) RunAndReturn(run func() nodev1.Nod func (_m *mockEcosystemClientSet) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1alpha1") + } + var r0 nodev1alpha1.NodeV1alpha1Interface if rf, ok := ret.Get(0).(func() nodev1alpha1.NodeV1alpha1Interface); ok { r0 = rf() @@ -1848,6 +2059,10 @@ func (_c *mockEcosystemClientSet_NodeV1alpha1_Call) RunAndReturn(run func() node func (_m *mockEcosystemClientSet) NodeV1beta1() nodev1beta1.NodeV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeV1beta1") + } + var r0 nodev1beta1.NodeV1beta1Interface if rf, ok := ret.Get(0).(func() nodev1beta1.NodeV1beta1Interface); ok { r0 = rf() @@ -1891,6 +2106,10 @@ func (_c *mockEcosystemClientSet_NodeV1beta1_Call) RunAndReturn(run func() nodev func (_m *mockEcosystemClientSet) PolicyV1() policyv1.PolicyV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1") + } + var r0 policyv1.PolicyV1Interface if rf, ok := ret.Get(0).(func() policyv1.PolicyV1Interface); ok { r0 = rf() @@ -1934,6 +2153,10 @@ func (_c *mockEcosystemClientSet_PolicyV1_Call) RunAndReturn(run func() policyv1 func (_m *mockEcosystemClientSet) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PolicyV1beta1") + } + var r0 policyv1beta1.PolicyV1beta1Interface if rf, ok := ret.Get(0).(func() policyv1beta1.PolicyV1beta1Interface); ok { r0 = rf() @@ -1977,6 +2200,10 @@ func (_c *mockEcosystemClientSet_PolicyV1beta1_Call) RunAndReturn(run func() pol func (_m *mockEcosystemClientSet) RbacV1() rbacv1.RbacV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1") + } + var r0 rbacv1.RbacV1Interface if rf, ok := ret.Get(0).(func() rbacv1.RbacV1Interface); ok { r0 = rf() @@ -2020,6 +2247,10 @@ func (_c *mockEcosystemClientSet_RbacV1_Call) RunAndReturn(run func() rbacv1.Rba func (_m *mockEcosystemClientSet) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1alpha1") + } + var r0 rbacv1alpha1.RbacV1alpha1Interface if rf, ok := ret.Get(0).(func() rbacv1alpha1.RbacV1alpha1Interface); ok { r0 = rf() @@ -2063,6 +2294,10 @@ func (_c *mockEcosystemClientSet_RbacV1alpha1_Call) RunAndReturn(run func() rbac func (_m *mockEcosystemClientSet) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RbacV1beta1") + } + var r0 rbacv1beta1.RbacV1beta1Interface if rf, ok := ret.Get(0).(func() rbacv1beta1.RbacV1beta1Interface); ok { r0 = rf() @@ -2102,45 +2337,49 @@ func (_c *mockEcosystemClientSet_RbacV1beta1_Call) RunAndReturn(run func() rbacv return _c } -// ResourceV1alpha2 provides a mock function with given fields: -func (_m *mockEcosystemClientSet) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { +// ResourceV1alpha3 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) ResourceV1alpha3() v1alpha3.ResourceV1alpha3Interface { ret := _m.Called() - var r0 v1alpha2.ResourceV1alpha2Interface - if rf, ok := ret.Get(0).(func() v1alpha2.ResourceV1alpha2Interface); ok { + if len(ret) == 0 { + panic("no return value specified for ResourceV1alpha3") + } + + var r0 v1alpha3.ResourceV1alpha3Interface + if rf, ok := ret.Get(0).(func() v1alpha3.ResourceV1alpha3Interface); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(v1alpha2.ResourceV1alpha2Interface) + r0 = ret.Get(0).(v1alpha3.ResourceV1alpha3Interface) } } return r0 } -// mockEcosystemClientSet_ResourceV1alpha2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha2' -type mockEcosystemClientSet_ResourceV1alpha2_Call struct { +// mockEcosystemClientSet_ResourceV1alpha3_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceV1alpha3' +type mockEcosystemClientSet_ResourceV1alpha3_Call struct { *mock.Call } -// ResourceV1alpha2 is a helper method to define mock.On call -func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha2() *mockEcosystemClientSet_ResourceV1alpha2_Call { - return &mockEcosystemClientSet_ResourceV1alpha2_Call{Call: _e.mock.On("ResourceV1alpha2")} +// ResourceV1alpha3 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) ResourceV1alpha3() *mockEcosystemClientSet_ResourceV1alpha3_Call { + return &mockEcosystemClientSet_ResourceV1alpha3_Call{Call: _e.mock.On("ResourceV1alpha3")} } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Run(run func()) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) Return(_a0 v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) Return(_a0 v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(_a0) return _c } -func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() v1alpha2.ResourceV1alpha2Interface) *mockEcosystemClientSet_ResourceV1alpha2_Call { +func (_c *mockEcosystemClientSet_ResourceV1alpha3_Call) RunAndReturn(run func() v1alpha3.ResourceV1alpha3Interface) *mockEcosystemClientSet_ResourceV1alpha3_Call { _c.Call.Return(run) return _c } @@ -2149,6 +2388,10 @@ func (_c *mockEcosystemClientSet_ResourceV1alpha2_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) SchedulingV1() schedulingv1.SchedulingV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1") + } + var r0 schedulingv1.SchedulingV1Interface if rf, ok := ret.Get(0).(func() schedulingv1.SchedulingV1Interface); ok { r0 = rf() @@ -2192,6 +2435,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1_Call) RunAndReturn(run func() sche func (_m *mockEcosystemClientSet) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1alpha1") + } + var r0 schedulingv1alpha1.SchedulingV1alpha1Interface if rf, ok := ret.Get(0).(func() schedulingv1alpha1.SchedulingV1alpha1Interface); ok { r0 = rf() @@ -2235,6 +2482,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1alpha1_Call) RunAndReturn(run func( func (_m *mockEcosystemClientSet) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchedulingV1beta1") + } + var r0 schedulingv1beta1.SchedulingV1beta1Interface if rf, ok := ret.Get(0).(func() schedulingv1beta1.SchedulingV1beta1Interface); ok { r0 = rf() @@ -2278,6 +2529,10 @@ func (_c *mockEcosystemClientSet_SchedulingV1beta1_Call) RunAndReturn(run func() func (_m *mockEcosystemClientSet) StorageV1() storagev1.StorageV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1") + } + var r0 storagev1.StorageV1Interface if rf, ok := ret.Get(0).(func() storagev1.StorageV1Interface); ok { r0 = rf() @@ -2321,6 +2576,10 @@ func (_c *mockEcosystemClientSet_StorageV1_Call) RunAndReturn(run func() storage func (_m *mockEcosystemClientSet) StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1alpha1") + } + var r0 storagev1alpha1.StorageV1alpha1Interface if rf, ok := ret.Get(0).(func() storagev1alpha1.StorageV1alpha1Interface); ok { r0 = rf() @@ -2364,6 +2623,10 @@ func (_c *mockEcosystemClientSet_StorageV1alpha1_Call) RunAndReturn(run func() s func (_m *mockEcosystemClientSet) StorageV1beta1() storagev1beta1.StorageV1beta1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for StorageV1beta1") + } + var r0 storagev1beta1.StorageV1beta1Interface if rf, ok := ret.Get(0).(func() storagev1beta1.StorageV1beta1Interface); ok { r0 = rf() @@ -2403,13 +2666,59 @@ func (_c *mockEcosystemClientSet_StorageV1beta1_Call) RunAndReturn(run func() st return _c } -type mockConstructorTestingTnewMockEcosystemClientSet interface { - mock.TestingT - Cleanup(func()) +// StoragemigrationV1alpha1 provides a mock function with given fields: +func (_m *mockEcosystemClientSet) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for StoragemigrationV1alpha1") + } + + var r0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface + if rf, ok := ret.Get(0).(func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) + } + } + + return r0 +} + +// mockEcosystemClientSet_StoragemigrationV1alpha1_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoragemigrationV1alpha1' +type mockEcosystemClientSet_StoragemigrationV1alpha1_Call struct { + *mock.Call +} + +// StoragemigrationV1alpha1 is a helper method to define mock.On call +func (_e *mockEcosystemClientSet_Expecter) StoragemigrationV1alpha1() *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + return &mockEcosystemClientSet_StoragemigrationV1alpha1_Call{Call: _e.mock.On("StoragemigrationV1alpha1")} +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Run(run func()) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) Return(_a0 storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockEcosystemClientSet_StoragemigrationV1alpha1_Call) RunAndReturn(run func() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface) *mockEcosystemClientSet_StoragemigrationV1alpha1_Call { + _c.Call.Return(run) + return _c } // newMockEcosystemClientSet creates a new instance of mockEcosystemClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemClientSet(t mockConstructorTestingTnewMockEcosystemClientSet) *mockEcosystemClientSet { +// The first argument is typically a *testing.T value. +func newMockEcosystemClientSet(t interface { + mock.TestingT + Cleanup(func()) +}) *mockEcosystemClientSet { mock := &mockEcosystemClientSet{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_ecosystemV1Alpha1Interface_test.go b/pkg/velero/mock_ecosystemV1Alpha1Interface_test.go index 82bc430..2c80a0e 100644 --- a/pkg/velero/mock_ecosystemV1Alpha1Interface_test.go +++ b/pkg/velero/mock_ecosystemV1Alpha1Interface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -24,6 +24,10 @@ func (_m *mockEcosystemV1Alpha1Interface) EXPECT() *mockEcosystemV1Alpha1Interfa func (_m *mockEcosystemV1Alpha1Interface) BackupSchedules(namespace string) ecosystem.BackupScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupSchedules") + } + var r0 ecosystem.BackupScheduleInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupScheduleInterface); ok { r0 = rf(namespace) @@ -68,6 +72,10 @@ func (_c *mockEcosystemV1Alpha1Interface_BackupSchedules_Call) RunAndReturn(run func (_m *mockEcosystemV1Alpha1Interface) Backups(namespace string) ecosystem.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 ecosystem.BackupInterface if rf, ok := ret.Get(0).(func(string) ecosystem.BackupInterface); ok { r0 = rf(namespace) @@ -112,6 +120,10 @@ func (_c *mockEcosystemV1Alpha1Interface_Backups_Call) RunAndReturn(run func(str func (_m *mockEcosystemV1Alpha1Interface) Restores(namespace string) ecosystem.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 ecosystem.RestoreInterface if rf, ok := ret.Get(0).(func(string) ecosystem.RestoreInterface); ok { r0 = rf(namespace) @@ -152,13 +164,12 @@ func (_c *mockEcosystemV1Alpha1Interface_Restores_Call) RunAndReturn(run func(st return _c } -type mockConstructorTestingTnewMockEcosystemV1Alpha1Interface interface { +// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemV1Alpha1Interface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemV1Alpha1Interface creates a new instance of mockEcosystemV1Alpha1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemV1Alpha1Interface(t mockConstructorTestingTnewMockEcosystemV1Alpha1Interface) *mockEcosystemV1Alpha1Interface { +}) *mockEcosystemV1Alpha1Interface { mock := &mockEcosystemV1Alpha1Interface{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_ecosystemWatch_test.go b/pkg/velero/mock_ecosystemWatch_test.go index 8082b0f..18207cc 100644 --- a/pkg/velero/mock_ecosystemWatch_test.go +++ b/pkg/velero/mock_ecosystemWatch_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -24,6 +24,10 @@ func (_m *mockEcosystemWatch) EXPECT() *mockEcosystemWatch_Expecter { func (_m *mockEcosystemWatch) ResultChan() <-chan watch.Event { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResultChan") + } + var r0 <-chan watch.Event if rf, ok := ret.Get(0).(func() <-chan watch.Event); ok { r0 = rf() @@ -95,13 +99,12 @@ func (_c *mockEcosystemWatch_Stop_Call) RunAndReturn(run func()) *mockEcosystemW return _c } -type mockConstructorTestingTnewMockEcosystemWatch interface { +// newMockEcosystemWatch creates a new instance of mockEcosystemWatch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEcosystemWatch(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEcosystemWatch creates a new instance of mockEcosystemWatch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEcosystemWatch(t mockConstructorTestingTnewMockEcosystemWatch) *mockEcosystemWatch { +}) *mockEcosystemWatch { mock := &mockEcosystemWatch{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_eventRecorder_test.go b/pkg/velero/mock_eventRecorder_test.go index 95f6e10..7527546 100644 --- a/pkg/velero/mock_eventRecorder_test.go +++ b/pkg/velero/mock_eventRecorder_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -151,13 +151,12 @@ func (_c *mockEventRecorder_Eventf_Call) RunAndReturn(run func(runtime.Object, s return _c } -type mockConstructorTestingTnewMockEventRecorder interface { +// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockEventRecorder(t interface { mock.TestingT Cleanup(func()) -} - -// newMockEventRecorder creates a new instance of mockEventRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEventRecorder(t mockConstructorTestingTnewMockEventRecorder) *mockEventRecorder { +}) *mockEventRecorder { mock := &mockEventRecorder{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_manager_test.go b/pkg/velero/mock_manager_test.go index 12bc56c..249df10 100644 --- a/pkg/velero/mock_manager_test.go +++ b/pkg/velero/mock_manager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -26,6 +26,10 @@ func (_m *mockManager) EXPECT() *mockManager_Expecter { func (_m *mockManager) CreateBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for CreateBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -69,6 +73,10 @@ func (_c *mockManager_CreateBackup_Call) RunAndReturn(run func(context.Context, func (_m *mockManager) CreateRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for CreateRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -112,6 +120,10 @@ func (_c *mockManager_CreateRestore_Call) RunAndReturn(run func(context.Context, func (_m *mockManager) DeleteBackup(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for DeleteBackup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -155,6 +167,10 @@ func (_c *mockManager_DeleteBackup_Call) RunAndReturn(run func(context.Context, func (_m *mockManager) DeleteRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for DeleteRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -198,6 +214,10 @@ func (_c *mockManager_DeleteRestore_Call) RunAndReturn(run func(context.Context, func (_m *mockManager) SyncBackupStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for SyncBackupStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -241,6 +261,10 @@ func (_c *mockManager_SyncBackupStatus_Call) RunAndReturn(run func(context.Conte func (_m *mockManager) SyncBackups(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SyncBackups") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -279,13 +303,12 @@ func (_c *mockManager_SyncBackups_Call) RunAndReturn(run func(context.Context) e return _c } -type mockConstructorTestingTnewMockManager interface { +// newMockManager creates a new instance of mockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockManager creates a new instance of mockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockManager(t mockConstructorTestingTnewMockManager) *mockManager { +}) *mockManager { mock := &mockManager{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_restoreManager_test.go b/pkg/velero/mock_restoreManager_test.go index 7b3648d..9b979f2 100644 --- a/pkg/velero/mock_restoreManager_test.go +++ b/pkg/velero/mock_restoreManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -26,6 +26,10 @@ func (_m *mockRestoreManager) EXPECT() *mockRestoreManager_Expecter { func (_m *mockRestoreManager) CreateRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for CreateRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -69,6 +73,10 @@ func (_c *mockRestoreManager_CreateRestore_Call) RunAndReturn(run func(context.C func (_m *mockRestoreManager) DeleteRestore(ctx context.Context, restore *v1.Restore) error { ret := _m.Called(ctx, restore) + if len(ret) == 0 { + panic("no return value specified for DeleteRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore) error); ok { r0 = rf(ctx, restore) @@ -108,13 +116,12 @@ func (_c *mockRestoreManager_DeleteRestore_Call) RunAndReturn(run func(context.C return _c } -type mockConstructorTestingTnewMockRestoreManager interface { +// newMockRestoreManager creates a new instance of mockRestoreManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRestoreManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockRestoreManager creates a new instance of mockRestoreManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRestoreManager(t mockConstructorTestingTnewMockRestoreManager) *mockRestoreManager { +}) *mockRestoreManager { mock := &mockRestoreManager{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_syncManager_test.go b/pkg/velero/mock_syncManager_test.go index 3a63be8..1c05409 100644 --- a/pkg/velero/mock_syncManager_test.go +++ b/pkg/velero/mock_syncManager_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -26,6 +26,10 @@ func (_m *mockSyncManager) EXPECT() *mockSyncManager_Expecter { func (_m *mockSyncManager) SyncBackupStatus(ctx context.Context, backup *v1.Backup) error { ret := _m.Called(ctx, backup) + if len(ret) == 0 { + panic("no return value specified for SyncBackupStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup) error); ok { r0 = rf(ctx, backup) @@ -69,6 +73,10 @@ func (_c *mockSyncManager_SyncBackupStatus_Call) RunAndReturn(run func(context.C func (_m *mockSyncManager) SyncBackups(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SyncBackups") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -107,13 +115,12 @@ func (_c *mockSyncManager_SyncBackups_Call) RunAndReturn(run func(context.Contex return _c } -type mockConstructorTestingTnewMockSyncManager interface { +// newMockSyncManager creates a new instance of mockSyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockSyncManager(t interface { mock.TestingT Cleanup(func()) -} - -// newMockSyncManager creates a new instance of mockSyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockSyncManager(t mockConstructorTestingTnewMockSyncManager) *mockSyncManager { +}) *mockSyncManager { mock := &mockSyncManager{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_veleroBackupInterface_test.go b/pkg/velero/mock_veleroBackupInterface_test.go index 85d13cd..425c936 100644 --- a/pkg/velero/mock_veleroBackupInterface_test.go +++ b/pkg/velero/mock_veleroBackupInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -32,6 +32,10 @@ func (_m *mockVeleroBackupInterface) EXPECT() *mockVeleroBackupInterface_Expecte func (_m *mockVeleroBackupInterface) Create(ctx context.Context, backup *v1.Backup, opts metav1.CreateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.CreateOptions) (*v1.Backup, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockVeleroBackupInterface_Create_Call) RunAndReturn(run func(context.C func (_m *mockVeleroBackupInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -132,6 +140,10 @@ func (_c *mockVeleroBackupInterface_Delete_Call) RunAndReturn(run func(context.C func (_m *mockVeleroBackupInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -176,6 +188,10 @@ func (_c *mockVeleroBackupInterface_DeleteCollection_Call) RunAndReturn(run func func (_m *mockVeleroBackupInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Backup, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Backup, error)); ok { @@ -232,6 +248,10 @@ func (_c *mockVeleroBackupInterface_Get_Call) RunAndReturn(run func(context.Cont func (_m *mockVeleroBackupInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupList, error)); ok { @@ -294,6 +314,10 @@ func (_m *mockVeleroBackupInterface) Patch(ctx context.Context, name string, pt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Backup, error)); ok { @@ -360,6 +384,10 @@ func (_c *mockVeleroBackupInterface_Patch_Call) RunAndReturn(run func(context.Co func (_m *mockVeleroBackupInterface) Update(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -416,6 +444,10 @@ func (_c *mockVeleroBackupInterface_Update_Call) RunAndReturn(run func(context.C func (_m *mockVeleroBackupInterface) UpdateStatus(ctx context.Context, backup *v1.Backup, opts metav1.UpdateOptions) (*v1.Backup, error) { ret := _m.Called(ctx, backup, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Backup var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Backup, metav1.UpdateOptions) (*v1.Backup, error)); ok { @@ -472,6 +504,10 @@ func (_c *mockVeleroBackupInterface_UpdateStatus_Call) RunAndReturn(run func(con func (_m *mockVeleroBackupInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -523,13 +559,12 @@ func (_c *mockVeleroBackupInterface_Watch_Call) RunAndReturn(run func(context.Co return _c } -type mockConstructorTestingTnewMockVeleroBackupInterface interface { +// newMockVeleroBackupInterface creates a new instance of mockVeleroBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVeleroBackupInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockVeleroBackupInterface creates a new instance of mockVeleroBackupInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockVeleroBackupInterface(t mockConstructorTestingTnewMockVeleroBackupInterface) *mockVeleroBackupInterface { +}) *mockVeleroBackupInterface { mock := &mockVeleroBackupInterface{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_veleroBackupStorageLocationInterface_test.go b/pkg/velero/mock_veleroBackupStorageLocationInterface_test.go index 3299f97..d52172f 100644 --- a/pkg/velero/mock_veleroBackupStorageLocationInterface_test.go +++ b/pkg/velero/mock_veleroBackupStorageLocationInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -32,6 +32,10 @@ func (_m *mockVeleroBackupStorageLocationInterface) EXPECT() *mockVeleroBackupSt func (_m *mockVeleroBackupStorageLocationInterface) Create(ctx context.Context, backupStorageLocation *v1.BackupStorageLocation, opts metav1.CreateOptions) (*v1.BackupStorageLocation, error) { ret := _m.Called(ctx, backupStorageLocation, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.BackupStorageLocation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupStorageLocation, metav1.CreateOptions) (*v1.BackupStorageLocation, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_Create_Call) RunAndReturn(run func (_m *mockVeleroBackupStorageLocationInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -132,6 +140,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_Delete_Call) RunAndReturn(run func (_m *mockVeleroBackupStorageLocationInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -176,6 +188,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_DeleteCollection_Call) RunAnd func (_m *mockVeleroBackupStorageLocationInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.BackupStorageLocation, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.BackupStorageLocation var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.BackupStorageLocation, error)); ok { @@ -232,6 +248,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_Get_Call) RunAndReturn(run fu func (_m *mockVeleroBackupStorageLocationInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.BackupStorageLocationList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.BackupStorageLocationList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.BackupStorageLocationList, error)); ok { @@ -294,6 +314,10 @@ func (_m *mockVeleroBackupStorageLocationInterface) Patch(ctx context.Context, n _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.BackupStorageLocation var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.BackupStorageLocation, error)); ok { @@ -360,6 +384,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_Patch_Call) RunAndReturn(run func (_m *mockVeleroBackupStorageLocationInterface) Update(ctx context.Context, backupStorageLocation *v1.BackupStorageLocation, opts metav1.UpdateOptions) (*v1.BackupStorageLocation, error) { ret := _m.Called(ctx, backupStorageLocation, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.BackupStorageLocation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupStorageLocation, metav1.UpdateOptions) (*v1.BackupStorageLocation, error)); ok { @@ -416,6 +444,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_Update_Call) RunAndReturn(run func (_m *mockVeleroBackupStorageLocationInterface) UpdateStatus(ctx context.Context, backupStorageLocation *v1.BackupStorageLocation, opts metav1.UpdateOptions) (*v1.BackupStorageLocation, error) { ret := _m.Called(ctx, backupStorageLocation, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.BackupStorageLocation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.BackupStorageLocation, metav1.UpdateOptions) (*v1.BackupStorageLocation, error)); ok { @@ -472,6 +504,10 @@ func (_c *mockVeleroBackupStorageLocationInterface_UpdateStatus_Call) RunAndRetu func (_m *mockVeleroBackupStorageLocationInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -523,13 +559,12 @@ func (_c *mockVeleroBackupStorageLocationInterface_Watch_Call) RunAndReturn(run return _c } -type mockConstructorTestingTnewMockVeleroBackupStorageLocationInterface interface { +// newMockVeleroBackupStorageLocationInterface creates a new instance of mockVeleroBackupStorageLocationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVeleroBackupStorageLocationInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockVeleroBackupStorageLocationInterface creates a new instance of mockVeleroBackupStorageLocationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockVeleroBackupStorageLocationInterface(t mockConstructorTestingTnewMockVeleroBackupStorageLocationInterface) *mockVeleroBackupStorageLocationInterface { +}) *mockVeleroBackupStorageLocationInterface { mock := &mockVeleroBackupStorageLocationInterface{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_veleroClientSet_test.go b/pkg/velero/mock_veleroClientSet_test.go index 3e453f0..0f6576e 100644 --- a/pkg/velero/mock_veleroClientSet_test.go +++ b/pkg/velero/mock_veleroClientSet_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -28,6 +28,10 @@ func (_m *mockVeleroClientSet) EXPECT() *mockVeleroClientSet_Expecter { func (_m *mockVeleroClientSet) Discovery() discovery.DiscoveryInterface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Discovery") + } + var r0 discovery.DiscoveryInterface if rf, ok := ret.Get(0).(func() discovery.DiscoveryInterface); ok { r0 = rf() @@ -71,6 +75,10 @@ func (_c *mockVeleroClientSet_Discovery_Call) RunAndReturn(run func() discovery. func (_m *mockVeleroClientSet) VeleroV1() v1.VeleroV1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VeleroV1") + } + var r0 v1.VeleroV1Interface if rf, ok := ret.Get(0).(func() v1.VeleroV1Interface); ok { r0 = rf() @@ -114,6 +122,10 @@ func (_c *mockVeleroClientSet_VeleroV1_Call) RunAndReturn(run func() v1.VeleroV1 func (_m *mockVeleroClientSet) VeleroV2alpha1() v2alpha1.VeleroV2alpha1Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VeleroV2alpha1") + } + var r0 v2alpha1.VeleroV2alpha1Interface if rf, ok := ret.Get(0).(func() v2alpha1.VeleroV2alpha1Interface); ok { r0 = rf() @@ -153,13 +165,12 @@ func (_c *mockVeleroClientSet_VeleroV2alpha1_Call) RunAndReturn(run func() v2alp return _c } -type mockConstructorTestingTnewMockVeleroClientSet interface { +// newMockVeleroClientSet creates a new instance of mockVeleroClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVeleroClientSet(t interface { mock.TestingT Cleanup(func()) -} - -// newMockVeleroClientSet creates a new instance of mockVeleroClientSet. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockVeleroClientSet(t mockConstructorTestingTnewMockVeleroClientSet) *mockVeleroClientSet { +}) *mockVeleroClientSet { mock := &mockVeleroClientSet{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_veleroDeleteBackupRequest_test.go b/pkg/velero/mock_veleroDeleteBackupRequest_test.go index 40561f2..f461bd4 100644 --- a/pkg/velero/mock_veleroDeleteBackupRequest_test.go +++ b/pkg/velero/mock_veleroDeleteBackupRequest_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -32,6 +32,10 @@ func (_m *mockVeleroDeleteBackupRequest) EXPECT() *mockVeleroDeleteBackupRequest func (_m *mockVeleroDeleteBackupRequest) Create(ctx context.Context, deleteBackupRequest *v1.DeleteBackupRequest, opts metav1.CreateOptions) (*v1.DeleteBackupRequest, error) { ret := _m.Called(ctx, deleteBackupRequest, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.DeleteBackupRequest var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.DeleteBackupRequest, metav1.CreateOptions) (*v1.DeleteBackupRequest, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockVeleroDeleteBackupRequest_Create_Call) RunAndReturn(run func(conte func (_m *mockVeleroDeleteBackupRequest) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -132,6 +140,10 @@ func (_c *mockVeleroDeleteBackupRequest_Delete_Call) RunAndReturn(run func(conte func (_m *mockVeleroDeleteBackupRequest) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -176,6 +188,10 @@ func (_c *mockVeleroDeleteBackupRequest_DeleteCollection_Call) RunAndReturn(run func (_m *mockVeleroDeleteBackupRequest) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DeleteBackupRequest, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.DeleteBackupRequest var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.DeleteBackupRequest, error)); ok { @@ -232,6 +248,10 @@ func (_c *mockVeleroDeleteBackupRequest_Get_Call) RunAndReturn(run func(context. func (_m *mockVeleroDeleteBackupRequest) List(ctx context.Context, opts metav1.ListOptions) (*v1.DeleteBackupRequestList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.DeleteBackupRequestList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.DeleteBackupRequestList, error)); ok { @@ -294,6 +314,10 @@ func (_m *mockVeleroDeleteBackupRequest) Patch(ctx context.Context, name string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.DeleteBackupRequest var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.DeleteBackupRequest, error)); ok { @@ -360,6 +384,10 @@ func (_c *mockVeleroDeleteBackupRequest_Patch_Call) RunAndReturn(run func(contex func (_m *mockVeleroDeleteBackupRequest) Update(ctx context.Context, deleteBackupRequest *v1.DeleteBackupRequest, opts metav1.UpdateOptions) (*v1.DeleteBackupRequest, error) { ret := _m.Called(ctx, deleteBackupRequest, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.DeleteBackupRequest var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.DeleteBackupRequest, metav1.UpdateOptions) (*v1.DeleteBackupRequest, error)); ok { @@ -416,6 +444,10 @@ func (_c *mockVeleroDeleteBackupRequest_Update_Call) RunAndReturn(run func(conte func (_m *mockVeleroDeleteBackupRequest) UpdateStatus(ctx context.Context, deleteBackupRequest *v1.DeleteBackupRequest, opts metav1.UpdateOptions) (*v1.DeleteBackupRequest, error) { ret := _m.Called(ctx, deleteBackupRequest, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.DeleteBackupRequest var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.DeleteBackupRequest, metav1.UpdateOptions) (*v1.DeleteBackupRequest, error)); ok { @@ -472,6 +504,10 @@ func (_c *mockVeleroDeleteBackupRequest_UpdateStatus_Call) RunAndReturn(run func func (_m *mockVeleroDeleteBackupRequest) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -523,13 +559,12 @@ func (_c *mockVeleroDeleteBackupRequest_Watch_Call) RunAndReturn(run func(contex return _c } -type mockConstructorTestingTnewMockVeleroDeleteBackupRequest interface { +// newMockVeleroDeleteBackupRequest creates a new instance of mockVeleroDeleteBackupRequest. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVeleroDeleteBackupRequest(t interface { mock.TestingT Cleanup(func()) -} - -// newMockVeleroDeleteBackupRequest creates a new instance of mockVeleroDeleteBackupRequest. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockVeleroDeleteBackupRequest(t mockConstructorTestingTnewMockVeleroDeleteBackupRequest) *mockVeleroDeleteBackupRequest { +}) *mockVeleroDeleteBackupRequest { mock := &mockVeleroDeleteBackupRequest{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_veleroInterface_test.go b/pkg/velero/mock_veleroInterface_test.go index 2613eb7..7f1cbcf 100644 --- a/pkg/velero/mock_veleroInterface_test.go +++ b/pkg/velero/mock_veleroInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -26,6 +26,10 @@ func (_m *mockVeleroInterface) EXPECT() *mockVeleroInterface_Expecter { func (_m *mockVeleroInterface) BackupRepositories(namespace string) v1.BackupRepositoryInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupRepositories") + } + var r0 v1.BackupRepositoryInterface if rf, ok := ret.Get(0).(func(string) v1.BackupRepositoryInterface); ok { r0 = rf(namespace) @@ -70,6 +74,10 @@ func (_c *mockVeleroInterface_BackupRepositories_Call) RunAndReturn(run func(str func (_m *mockVeleroInterface) BackupStorageLocations(namespace string) v1.BackupStorageLocationInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for BackupStorageLocations") + } + var r0 v1.BackupStorageLocationInterface if rf, ok := ret.Get(0).(func(string) v1.BackupStorageLocationInterface); ok { r0 = rf(namespace) @@ -114,6 +122,10 @@ func (_c *mockVeleroInterface_BackupStorageLocations_Call) RunAndReturn(run func func (_m *mockVeleroInterface) Backups(namespace string) v1.BackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Backups") + } + var r0 v1.BackupInterface if rf, ok := ret.Get(0).(func(string) v1.BackupInterface); ok { r0 = rf(namespace) @@ -158,6 +170,10 @@ func (_c *mockVeleroInterface_Backups_Call) RunAndReturn(run func(string) v1.Bac func (_m *mockVeleroInterface) DeleteBackupRequests(namespace string) v1.DeleteBackupRequestInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for DeleteBackupRequests") + } + var r0 v1.DeleteBackupRequestInterface if rf, ok := ret.Get(0).(func(string) v1.DeleteBackupRequestInterface); ok { r0 = rf(namespace) @@ -202,6 +218,10 @@ func (_c *mockVeleroInterface_DeleteBackupRequests_Call) RunAndReturn(run func(s func (_m *mockVeleroInterface) DownloadRequests(namespace string) v1.DownloadRequestInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for DownloadRequests") + } + var r0 v1.DownloadRequestInterface if rf, ok := ret.Get(0).(func(string) v1.DownloadRequestInterface); ok { r0 = rf(namespace) @@ -246,6 +266,10 @@ func (_c *mockVeleroInterface_DownloadRequests_Call) RunAndReturn(run func(strin func (_m *mockVeleroInterface) PodVolumeBackups(namespace string) v1.PodVolumeBackupInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for PodVolumeBackups") + } + var r0 v1.PodVolumeBackupInterface if rf, ok := ret.Get(0).(func(string) v1.PodVolumeBackupInterface); ok { r0 = rf(namespace) @@ -290,6 +314,10 @@ func (_c *mockVeleroInterface_PodVolumeBackups_Call) RunAndReturn(run func(strin func (_m *mockVeleroInterface) PodVolumeRestores(namespace string) v1.PodVolumeRestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for PodVolumeRestores") + } + var r0 v1.PodVolumeRestoreInterface if rf, ok := ret.Get(0).(func(string) v1.PodVolumeRestoreInterface); ok { r0 = rf(namespace) @@ -334,6 +362,10 @@ func (_c *mockVeleroInterface_PodVolumeRestores_Call) RunAndReturn(run func(stri func (_m *mockVeleroInterface) RESTClient() rest.Interface { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + var r0 rest.Interface if rf, ok := ret.Get(0).(func() rest.Interface); ok { r0 = rf() @@ -377,6 +409,10 @@ func (_c *mockVeleroInterface_RESTClient_Call) RunAndReturn(run func() rest.Inte func (_m *mockVeleroInterface) Restores(namespace string) v1.RestoreInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Restores") + } + var r0 v1.RestoreInterface if rf, ok := ret.Get(0).(func(string) v1.RestoreInterface); ok { r0 = rf(namespace) @@ -421,6 +457,10 @@ func (_c *mockVeleroInterface_Restores_Call) RunAndReturn(run func(string) v1.Re func (_m *mockVeleroInterface) Schedules(namespace string) v1.ScheduleInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for Schedules") + } + var r0 v1.ScheduleInterface if rf, ok := ret.Get(0).(func(string) v1.ScheduleInterface); ok { r0 = rf(namespace) @@ -465,6 +505,10 @@ func (_c *mockVeleroInterface_Schedules_Call) RunAndReturn(run func(string) v1.S func (_m *mockVeleroInterface) ServerStatusRequests(namespace string) v1.ServerStatusRequestInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ServerStatusRequests") + } + var r0 v1.ServerStatusRequestInterface if rf, ok := ret.Get(0).(func(string) v1.ServerStatusRequestInterface); ok { r0 = rf(namespace) @@ -509,6 +553,10 @@ func (_c *mockVeleroInterface_ServerStatusRequests_Call) RunAndReturn(run func(s func (_m *mockVeleroInterface) VolumeSnapshotLocations(namespace string) v1.VolumeSnapshotLocationInterface { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for VolumeSnapshotLocations") + } + var r0 v1.VolumeSnapshotLocationInterface if rf, ok := ret.Get(0).(func(string) v1.VolumeSnapshotLocationInterface); ok { r0 = rf(namespace) @@ -549,13 +597,12 @@ func (_c *mockVeleroInterface_VolumeSnapshotLocations_Call) RunAndReturn(run fun return _c } -type mockConstructorTestingTnewMockVeleroInterface interface { +// newMockVeleroInterface creates a new instance of mockVeleroInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVeleroInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockVeleroInterface creates a new instance of mockVeleroInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockVeleroInterface(t mockConstructorTestingTnewMockVeleroInterface) *mockVeleroInterface { +}) *mockVeleroInterface { mock := &mockVeleroInterface{} mock.Mock.Test(t) diff --git a/pkg/velero/mock_veleroRestoreInterface_test.go b/pkg/velero/mock_veleroRestoreInterface_test.go index 86410c9..668c256 100644 --- a/pkg/velero/mock_veleroRestoreInterface_test.go +++ b/pkg/velero/mock_veleroRestoreInterface_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. +// Code generated by mockery v2.42.1. DO NOT EDIT. package velero @@ -32,6 +32,10 @@ func (_m *mockVeleroRestoreInterface) EXPECT() *mockVeleroRestoreInterface_Expec func (_m *mockVeleroRestoreInterface) Create(ctx context.Context, restore *v1.Restore, opts metav1.CreateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.CreateOptions) (*v1.Restore, error)); ok { @@ -88,6 +92,10 @@ func (_c *mockVeleroRestoreInterface_Create_Call) RunAndReturn(run func(context. func (_m *mockVeleroRestoreInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { r0 = rf(ctx, name, opts) @@ -132,6 +140,10 @@ func (_c *mockVeleroRestoreInterface_Delete_Call) RunAndReturn(run func(context. func (_m *mockVeleroRestoreInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { ret := _m.Called(ctx, opts, listOpts) + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { r0 = rf(ctx, opts, listOpts) @@ -176,6 +188,10 @@ func (_c *mockVeleroRestoreInterface_DeleteCollection_Call) RunAndReturn(run fun func (_m *mockVeleroRestoreInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Restore, error) { ret := _m.Called(ctx, name, opts) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*v1.Restore, error)); ok { @@ -232,6 +248,10 @@ func (_c *mockVeleroRestoreInterface_Get_Call) RunAndReturn(run func(context.Con func (_m *mockVeleroRestoreInterface) List(ctx context.Context, opts metav1.ListOptions) (*v1.RestoreList, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 *v1.RestoreList var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*v1.RestoreList, error)); ok { @@ -294,6 +314,10 @@ func (_m *mockVeleroRestoreInterface) Patch(ctx context.Context, name string, pt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Patch") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*v1.Restore, error)); ok { @@ -360,6 +384,10 @@ func (_c *mockVeleroRestoreInterface_Patch_Call) RunAndReturn(run func(context.C func (_m *mockVeleroRestoreInterface) Update(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -416,6 +444,10 @@ func (_c *mockVeleroRestoreInterface_Update_Call) RunAndReturn(run func(context. func (_m *mockVeleroRestoreInterface) UpdateStatus(ctx context.Context, restore *v1.Restore, opts metav1.UpdateOptions) (*v1.Restore, error) { ret := _m.Called(ctx, restore, opts) + if len(ret) == 0 { + panic("no return value specified for UpdateStatus") + } + var r0 *v1.Restore var r1 error if rf, ok := ret.Get(0).(func(context.Context, *v1.Restore, metav1.UpdateOptions) (*v1.Restore, error)); ok { @@ -472,6 +504,10 @@ func (_c *mockVeleroRestoreInterface_UpdateStatus_Call) RunAndReturn(run func(co func (_m *mockVeleroRestoreInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { ret := _m.Called(ctx, opts) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 watch.Interface var r1 error if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { @@ -523,13 +559,12 @@ func (_c *mockVeleroRestoreInterface_Watch_Call) RunAndReturn(run func(context.C return _c } -type mockConstructorTestingTnewMockVeleroRestoreInterface interface { +// newMockVeleroRestoreInterface creates a new instance of mockVeleroRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVeleroRestoreInterface(t interface { mock.TestingT Cleanup(func()) -} - -// newMockVeleroRestoreInterface creates a new instance of mockVeleroRestoreInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockVeleroRestoreInterface(t mockConstructorTestingTnewMockVeleroRestoreInterface) *mockVeleroRestoreInterface { +}) *mockVeleroRestoreInterface { mock := &mockVeleroRestoreInterface{} mock.Mock.Test(t) From 7fe491641acbe373c974d5e1bb4d71c8ccea56b4 Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 10:48:10 +0200 Subject: [PATCH 02/19] #31 add k8s-registry-lib --- go.mod | 19 ++++++++++--------- go.sum | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index f5e68d3..ef141f4 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ toolchain go1.23.1 require ( github.com/Masterminds/semver/v3 v3.3.0 github.com/cloudogu/cesapp-lib v0.14.0 + github.com/cloudogu/k8s-registry-lib v0.4.1 github.com/dlclark/regexp2 v1.11.4 github.com/go-logr/logr v1.4.2 github.com/google/gnostic-models v0.6.8 @@ -26,16 +27,16 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/eapache/go-resiliency v1.4.0 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/eapache/go-resiliency v1.7.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect @@ -66,13 +67,13 @@ require ( go.etcd.io/etcd/client/v2 v2.305.13 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect golang.org/x/sys v0.24.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect - golang.org/x/time v0.5.0 // indirect + golang.org/x/time v0.6.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.34.2 // indirect @@ -84,7 +85,7 @@ require ( k8s.io/apiextensions-apiserver v0.31.0 // indirect k8s.io/component-base v0.31.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index cb9f17c..8a1a333 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,7 @@ github.com/cloudogu/cesapp-lib v0.12.2 h1:++yK7s69DMCtpIt1nQ2x05cGAe6UH4KnsgEscV github.com/cloudogu/cesapp-lib v0.12.2/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= github.com/cloudogu/cesapp-lib v0.14.0 h1:955cU7ivgiSJGPJ36/YHhbrT0d7Km+7BwOITPrAJijo= github.com/cloudogu/cesapp-lib v0.14.0/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= +github.com/cloudogu/k8s-registry-lib v0.4.1/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -29,8 +30,12 @@ github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yA github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-resiliency v1.7.0 h1:n3NRTnBn5N0Cbi/IeOHuQn9s2UwVUH7Ga0ZWcP+9JTA= +github.com/eapache/go-resiliency v1.7.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= @@ -60,11 +65,17 @@ github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -252,6 +263,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= +golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -277,6 +290,8 @@ golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -323,6 +338,8 @@ golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -421,6 +438,8 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 h1:GKE9U8BH16uynoxQii0auTjmmmuZ3O0LFMN6S0lPPhI= +k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= From d62aa902c74eb0d87c3d5f6933f982d64fc3b677 Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 11:23:25 +0200 Subject: [PATCH 03/19] #31 use k8s-registry-lib instead of etcd --- go.sum | 1 + main.go | 19 ++- pkg/backup/backupCreateManager.go | 17 +- pkg/backup/backupManager.go | 4 +- pkg/backup/interfaces.go | 6 + .../mock_globalConfigRepository_test.go | 151 ++++++++++++++++++ pkg/maintenance/interfaces.go | 6 + pkg/maintenance/looseCoupling.go | 4 +- pkg/maintenance/maintenance.go | 48 ++++-- .../mock_globalConfigRepository_test.go | 151 ++++++++++++++++++ pkg/restore/createManager.go | 4 +- pkg/restore/interfaces.go | 6 + pkg/restore/manager.go | 4 +- .../mock_globalConfigRepository_test.go | 151 ++++++++++++++++++ 14 files changed, 532 insertions(+), 40 deletions(-) create mode 100644 pkg/backup/mock_globalConfigRepository_test.go create mode 100644 pkg/maintenance/mock_globalConfigRepository_test.go create mode 100644 pkg/restore/mock_globalConfigRepository_test.go diff --git a/go.sum b/go.sum index 8a1a333..4b6e90c 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,7 @@ github.com/cloudogu/cesapp-lib v0.12.2 h1:++yK7s69DMCtpIt1nQ2x05cGAe6UH4KnsgEscV github.com/cloudogu/cesapp-lib v0.12.2/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= github.com/cloudogu/cesapp-lib v0.14.0 h1:955cU7ivgiSJGPJ36/YHhbrT0d7Km+7BwOITPrAJijo= github.com/cloudogu/cesapp-lib v0.14.0/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= +github.com/cloudogu/k8s-registry-lib v0.4.1 h1:V5fOMIYYH1XqwNQ0NjTWViD1G4R146KQVjIuCuPO5dc= github.com/cloudogu/k8s-registry-lib v0.4.1/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= diff --git a/main.go b/main.go index e0387d2..d246dbc 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "flag" "fmt" "github.com/cloudogu/k8s-backup-operator/pkg/provider" + "github.com/cloudogu/k8s-registry-lib/repository" "os" "time" @@ -24,9 +25,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - "github.com/cloudogu/cesapp-lib/core" - reg "github.com/cloudogu/cesapp-lib/registry" - "github.com/cloudogu/k8s-backup-operator/pkg/additionalimages" "github.com/cloudogu/k8s-backup-operator/pkg/api/ecosystem" k8sv1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" @@ -273,14 +271,15 @@ func configureReconcilers(ctx context.Context, k8sManager controllerManager, ope return fmt.Errorf("unable to create ecosystem clientset: %w", err) } - registry, err := reg.New(core.Registry{ - Type: "etcd", - Endpoints: []string{fmt.Sprintf("http://etcd.%s.svc.cluster.local:4001", operatorConfig.Namespace)}, - }) + namespace, err := config.GetNamespace() if err != nil { - return fmt.Errorf("failed to create CES registry: %w", err) + return fmt.Errorf("failed to get namespace: %w", err) } + configMapClient := ecosystemClientSet.CoreV1().ConfigMaps(namespace) + + globalConfig := repository.NewGlobalConfigRepository(configMapClient) + err = syncBackupsWithProviders(ctx, operatorConfig, recorder, ecosystemClientSet) if err != nil { return fmt.Errorf("failed to sync backups with provider backups on startup: %w", err) @@ -306,14 +305,14 @@ func configureReconcilers(ctx context.Context, k8sManager controllerManager, ope ecosystemClientSet, operatorConfig.Namespace, recorder, - registry, + globalConfig, cleanupManager, ) if err = (restore.NewRestoreReconciler(ecosystemClientSet, recorder, operatorConfig.Namespace, restoreManager, requeueHandler)).SetupWithManager(k8sManager); err != nil { return fmt.Errorf("unable to create restore controller: %w", err) } - backupManager := backup.NewBackupManager(ecosystemClientSet, operatorConfig.Namespace, recorder, registry) + backupManager := backup.NewBackupManager(ecosystemClientSet, operatorConfig.Namespace, recorder, globalConfig) if err = (backup.NewBackupReconciler(ecosystemClientSet, recorder, operatorConfig.Namespace, backupManager, requeueHandler)).SetupWithManager(k8sManager); err != nil { return fmt.Errorf("unable to create backup controller: %w", err) } diff --git a/pkg/backup/backupCreateManager.go b/pkg/backup/backupCreateManager.go index 47edabc..afa85ba 100644 --- a/pkg/backup/backupCreateManager.go +++ b/pkg/backup/backupCreateManager.go @@ -8,7 +8,6 @@ import ( "github.com/cloudogu/k8s-backup-operator/pkg/retry" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/cloudogu/cesapp-lib/registry" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" "github.com/cloudogu/k8s-backup-operator/pkg/maintenance" @@ -22,17 +21,17 @@ const ( ) type backupCreateManager struct { - clientSet ecosystemInterface - namespace string - registry registry.Registry - recorder eventRecorder - maintenanceModeSwitch MaintenanceModeSwitch + clientSet ecosystemInterface + namespace string + globalConfigRepository globalConfigRepository + recorder eventRecorder + maintenanceModeSwitch MaintenanceModeSwitch } // newBackupCreateManager creates a new instance of backupCreateManager. -func newBackupCreateManager(clientSet ecosystemInterface, namespace string, recorder eventRecorder, registry registry.Registry) *backupCreateManager { - maintenanceModeSwitch := maintenance.New(registry.GlobalConfig()) - return &backupCreateManager{clientSet: clientSet, namespace: namespace, registry: registry, recorder: recorder, maintenanceModeSwitch: maintenanceModeSwitch} +func newBackupCreateManager(clientSet ecosystemInterface, namespace string, recorder eventRecorder, globalConfigRepository globalConfigRepository) *backupCreateManager { + maintenanceModeSwitch := maintenance.New(globalConfigRepository) + return &backupCreateManager{clientSet: clientSet, namespace: namespace, globalConfigRepository: globalConfigRepository, recorder: recorder, maintenanceModeSwitch: maintenanceModeSwitch} } func (bcm *backupCreateManager) create(ctx context.Context, backup *v1.Backup) error { diff --git a/pkg/backup/backupManager.go b/pkg/backup/backupManager.go index fd383b0..9cc48ba 100644 --- a/pkg/backup/backupManager.go +++ b/pkg/backup/backupManager.go @@ -7,8 +7,8 @@ type backupManager struct { } // NewBackupManager creates a new instance of backupManager containing a createManager, deleteManager and statusSyncManager. -func NewBackupManager(clientSet ecosystemInterface, namespace string, recorder eventRecorder, registry etcdRegistry) *backupManager { - creator := newBackupCreateManager(clientSet, namespace, recorder, registry) +func NewBackupManager(clientSet ecosystemInterface, namespace string, recorder eventRecorder, globalConfigRepository globalConfigRepository) *backupManager { + creator := newBackupCreateManager(clientSet, namespace, recorder, globalConfigRepository) remover := newBackupDeleteManager(clientSet, namespace, recorder) statusSyncManager := newBackupStatusSyncManager(clientSet, namespace, recorder) return &backupManager{createManager: creator, deleteManager: remover, statusSyncManager: statusSyncManager} diff --git a/pkg/backup/interfaces.go b/pkg/backup/interfaces.go index 5ee44c3..75d2222 100644 --- a/pkg/backup/interfaces.go +++ b/pkg/backup/interfaces.go @@ -6,6 +6,7 @@ import ( "github.com/cloudogu/k8s-backup-operator/pkg/api/ecosystem" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" "github.com/cloudogu/k8s-backup-operator/pkg/provider" + "github.com/cloudogu/k8s-registry-lib/config" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" ) @@ -76,3 +77,8 @@ type backupV1Alpha1Interface interface { type backupProvider interface { provider.Provider } + +type globalConfigRepository interface { + Get(ctx context.Context) (config.GlobalConfig, error) + Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) +} diff --git a/pkg/backup/mock_globalConfigRepository_test.go b/pkg/backup/mock_globalConfigRepository_test.go new file mode 100644 index 0000000..deec4ba --- /dev/null +++ b/pkg/backup/mock_globalConfigRepository_test.go @@ -0,0 +1,151 @@ +// Code generated by mockery v2.42.1. DO NOT EDIT. + +package backup + +import ( + context "context" + + config "github.com/cloudogu/k8s-registry-lib/config" + + mock "github.com/stretchr/testify/mock" +) + +// mockGlobalConfigRepository is an autogenerated mock type for the globalConfigRepository type +type mockGlobalConfigRepository struct { + mock.Mock +} + +type mockGlobalConfigRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *mockGlobalConfigRepository) EXPECT() *mockGlobalConfigRepository_Expecter { + return &mockGlobalConfigRepository_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function with given fields: ctx +func (_m *mockGlobalConfigRepository) Get(ctx context.Context) (config.GlobalConfig, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 config.GlobalConfig + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (config.GlobalConfig, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) config.GlobalConfig); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(config.GlobalConfig) + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockGlobalConfigRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type mockGlobalConfigRepository_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockGlobalConfigRepository_Expecter) Get(ctx interface{}) *mockGlobalConfigRepository_Get_Call { + return &mockGlobalConfigRepository_Get_Call{Call: _e.mock.On("Get", ctx)} +} + +func (_c *mockGlobalConfigRepository_Get_Call) Run(run func(ctx context.Context)) *mockGlobalConfigRepository_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockGlobalConfigRepository_Get_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockGlobalConfigRepository_Get_Call) RunAndReturn(run func(context.Context) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Get_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, globalConfig +func (_m *mockGlobalConfigRepository) Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) { + ret := _m.Called(ctx, globalConfig) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 config.GlobalConfig + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)); ok { + return rf(ctx, globalConfig) + } + if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) config.GlobalConfig); ok { + r0 = rf(ctx, globalConfig) + } else { + r0 = ret.Get(0).(config.GlobalConfig) + } + + if rf, ok := ret.Get(1).(func(context.Context, config.GlobalConfig) error); ok { + r1 = rf(ctx, globalConfig) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockGlobalConfigRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type mockGlobalConfigRepository_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - globalConfig config.GlobalConfig +func (_e *mockGlobalConfigRepository_Expecter) Update(ctx interface{}, globalConfig interface{}) *mockGlobalConfigRepository_Update_Call { + return &mockGlobalConfigRepository_Update_Call{Call: _e.mock.On("Update", ctx, globalConfig)} +} + +func (_c *mockGlobalConfigRepository_Update_Call) Run(run func(ctx context.Context, globalConfig config.GlobalConfig)) *mockGlobalConfigRepository_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(config.GlobalConfig)) + }) + return _c +} + +func (_c *mockGlobalConfigRepository_Update_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockGlobalConfigRepository_Update_Call) RunAndReturn(run func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Update_Call { + _c.Call.Return(run) + return _c +} + +// newMockGlobalConfigRepository creates a new instance of mockGlobalConfigRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGlobalConfigRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *mockGlobalConfigRepository { + mock := &mockGlobalConfigRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/maintenance/interfaces.go b/pkg/maintenance/interfaces.go index 2f543b1..a976fc6 100644 --- a/pkg/maintenance/interfaces.go +++ b/pkg/maintenance/interfaces.go @@ -3,6 +3,7 @@ package maintenance import ( "context" "github.com/cloudogu/cesapp-lib/registry" + "github.com/cloudogu/k8s-registry-lib/config" "k8s.io/apimachinery/pkg/watch" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -34,3 +35,8 @@ type globalConfig interface { type watcher interface { watch.Interface } + +type globalConfigRepository interface { + Get(ctx context.Context) (config.GlobalConfig, error) + Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) +} diff --git a/pkg/maintenance/looseCoupling.go b/pkg/maintenance/looseCoupling.go index 54a52ca..a7fe8cb 100644 --- a/pkg/maintenance/looseCoupling.go +++ b/pkg/maintenance/looseCoupling.go @@ -21,9 +21,9 @@ type looselyCoupledMaintenanceSwitch struct { // NewWithLooseCoupling creates a switch that checks if the configuration registry (e.g., etcd) exists before switching. // If the registry does not exist, no switch is executed. -func NewWithLooseCoupling(globalConfig globalConfig, clientSet statefulSetInterface, serviceInterface serviceInterface) *looselyCoupledMaintenanceSwitch { +func NewWithLooseCoupling(globalConfigRepository globalConfigRepository, clientSet statefulSetInterface, serviceInterface serviceInterface) *looselyCoupledMaintenanceSwitch { return &looselyCoupledMaintenanceSwitch{ - maintenanceModeSwitch: New(globalConfig), + maintenanceModeSwitch: New(globalConfigRepository), statefulSetClient: clientSet, serviceInterface: serviceInterface, } diff --git a/pkg/maintenance/maintenance.go b/pkg/maintenance/maintenance.go index dfe534a..e32b1a5 100644 --- a/pkg/maintenance/maintenance.go +++ b/pkg/maintenance/maintenance.go @@ -6,12 +6,13 @@ import ( "fmt" "github.com/cloudogu/k8s-backup-operator/pkg/requeue" + "github.com/cloudogu/k8s-registry-lib/config" ) const registryKeyMaintenance = "maintenance" type maintenanceSwitch struct { - globalConfig globalConfig + globalConfigRepository globalConfigRepository } type maintenanceRegistryObject struct { @@ -20,13 +21,13 @@ type maintenanceRegistryObject struct { } // New create a new instance of maintenanceSwitch. -func New(globalConfig globalConfig) *maintenanceSwitch { - return &maintenanceSwitch{globalConfig: globalConfig} +func New(globalConfigRepository globalConfigRepository) *maintenanceSwitch { + return &maintenanceSwitch{globalConfigRepository: globalConfigRepository} } // ActivateMaintenanceMode activates the maintenance mode with given title and text by writing in the global config. -func (ms *maintenanceSwitch) ActivateMaintenanceMode(_ context.Context, title string, text string) error { - isActive, err := ms.isActive() +func (ms *maintenanceSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { + isActive, err := ms.isActive(ctx) if err != nil { return err } @@ -38,24 +39,34 @@ func (ms *maintenanceSwitch) ActivateMaintenanceMode(_ context.Context, title st } } - return ms.activate(title, text) + return ms.activate(ctx, title, text) } // DeactivateMaintenanceMode deactivates the maintenance mode by deleting the maintenance key in the global config. -func (ms *maintenanceSwitch) DeactivateMaintenanceMode(_ context.Context) error { - return ms.globalConfig.Delete(registryKeyMaintenance) +func (ms *maintenanceSwitch) DeactivateMaintenanceMode(ctx context.Context) error { + globalConfig, err := ms.globalConfigRepository.Get(ctx) + if err != nil { + return fmt.Errorf("failed to get global config: %w", err) + } + cfg := globalConfig.Delete(registryKeyMaintenance) + _, err = ms.globalConfigRepository.Update(ctx, config.GlobalConfig{ + Config: cfg, + }) + return err } -func (ms *maintenanceSwitch) isActive() (bool, error) { - exists, err := ms.globalConfig.Exists(registryKeyMaintenance) +func (ms *maintenanceSwitch) isActive(ctx context.Context) (bool, error) { + globalConfig, err := ms.globalConfigRepository.Get(ctx) if err != nil { - return false, fmt.Errorf("failed to check if maintenance mode is active: %w", err) + return false, fmt.Errorf("failed to get global config: %w", err) } + _, exists := globalConfig.Get(registryKeyMaintenance) + return exists, nil } -func (ms *maintenanceSwitch) activate(title, text string) error { +func (ms *maintenanceSwitch) activate(ctx context.Context, title, text string) error { value := maintenanceRegistryObject{ Title: title, Text: text, @@ -66,5 +77,16 @@ func (ms *maintenanceSwitch) activate(title, text string) error { return fmt.Errorf("failed to marshal maintenance globalConfig value object [%+v]: %w", value, err) } - return ms.globalConfig.Set(registryKeyMaintenance, string(marshal)) + globalConfig, err := ms.globalConfigRepository.Get(ctx) + if err != nil { + return fmt.Errorf("failed to get global config: %w", err) + } + cfg, err := globalConfig.Set(registryKeyMaintenance, config.Value(marshal)) + if err != nil { + return fmt.Errorf("failed to set global config: %w", err) + } + _, err = ms.globalConfigRepository.Update(ctx, config.GlobalConfig{ + Config: cfg, + }) + return err } diff --git a/pkg/maintenance/mock_globalConfigRepository_test.go b/pkg/maintenance/mock_globalConfigRepository_test.go new file mode 100644 index 0000000..8f7e327 --- /dev/null +++ b/pkg/maintenance/mock_globalConfigRepository_test.go @@ -0,0 +1,151 @@ +// Code generated by mockery v2.42.1. DO NOT EDIT. + +package maintenance + +import ( + context "context" + + config "github.com/cloudogu/k8s-registry-lib/config" + + mock "github.com/stretchr/testify/mock" +) + +// mockGlobalConfigRepository is an autogenerated mock type for the globalConfigRepository type +type mockGlobalConfigRepository struct { + mock.Mock +} + +type mockGlobalConfigRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *mockGlobalConfigRepository) EXPECT() *mockGlobalConfigRepository_Expecter { + return &mockGlobalConfigRepository_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function with given fields: ctx +func (_m *mockGlobalConfigRepository) Get(ctx context.Context) (config.GlobalConfig, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 config.GlobalConfig + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (config.GlobalConfig, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) config.GlobalConfig); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(config.GlobalConfig) + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockGlobalConfigRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type mockGlobalConfigRepository_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockGlobalConfigRepository_Expecter) Get(ctx interface{}) *mockGlobalConfigRepository_Get_Call { + return &mockGlobalConfigRepository_Get_Call{Call: _e.mock.On("Get", ctx)} +} + +func (_c *mockGlobalConfigRepository_Get_Call) Run(run func(ctx context.Context)) *mockGlobalConfigRepository_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockGlobalConfigRepository_Get_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockGlobalConfigRepository_Get_Call) RunAndReturn(run func(context.Context) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Get_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, globalConfig +func (_m *mockGlobalConfigRepository) Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) { + ret := _m.Called(ctx, globalConfig) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 config.GlobalConfig + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)); ok { + return rf(ctx, globalConfig) + } + if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) config.GlobalConfig); ok { + r0 = rf(ctx, globalConfig) + } else { + r0 = ret.Get(0).(config.GlobalConfig) + } + + if rf, ok := ret.Get(1).(func(context.Context, config.GlobalConfig) error); ok { + r1 = rf(ctx, globalConfig) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockGlobalConfigRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type mockGlobalConfigRepository_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - globalConfig config.GlobalConfig +func (_e *mockGlobalConfigRepository_Expecter) Update(ctx interface{}, globalConfig interface{}) *mockGlobalConfigRepository_Update_Call { + return &mockGlobalConfigRepository_Update_Call{Call: _e.mock.On("Update", ctx, globalConfig)} +} + +func (_c *mockGlobalConfigRepository_Update_Call) Run(run func(ctx context.Context, globalConfig config.GlobalConfig)) *mockGlobalConfigRepository_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(config.GlobalConfig)) + }) + return _c +} + +func (_c *mockGlobalConfigRepository_Update_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockGlobalConfigRepository_Update_Call) RunAndReturn(run func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Update_Call { + _c.Call.Return(run) + return _c +} + +// newMockGlobalConfigRepository creates a new instance of mockGlobalConfigRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGlobalConfigRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *mockGlobalConfigRepository { + mock := &mockGlobalConfigRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/restore/createManager.go b/pkg/restore/createManager.go index cfd83ab..cad81a1 100644 --- a/pkg/restore/createManager.go +++ b/pkg/restore/createManager.go @@ -29,10 +29,10 @@ func newCreateManager( ecosystemClientSet ecosystemInterface, namespace string, recorder eventRecorder, - registry cesRegistry, + globalConfigRepository globalConfigRepository, cleanup cleanupManager, ) *defaultCreateManager { - maintenanceSwitch := maintenance.NewWithLooseCoupling(registry.GlobalConfig(), ecosystemClientSet.AppsV1().StatefulSets(namespace), ecosystemClientSet.CoreV1().Services(namespace)) + maintenanceSwitch := maintenance.NewWithLooseCoupling(globalConfigRepository, ecosystemClientSet.AppsV1().StatefulSets(namespace), ecosystemClientSet.CoreV1().Services(namespace)) return &defaultCreateManager{ ecosystemClientSet: ecosystemClientSet, namespace: namespace, diff --git a/pkg/restore/interfaces.go b/pkg/restore/interfaces.go index 8709cfd..b79fb48 100644 --- a/pkg/restore/interfaces.go +++ b/pkg/restore/interfaces.go @@ -3,6 +3,7 @@ package restore import ( "context" "github.com/cloudogu/k8s-backup-operator/pkg/cleanup" + "github.com/cloudogu/k8s-registry-lib/config" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" v12 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" @@ -107,3 +108,8 @@ type configurationContext interface { type restoreProvider interface { provider.Provider } + +type globalConfigRepository interface { + Get(ctx context.Context) (config.GlobalConfig, error) + Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) +} diff --git a/pkg/restore/manager.go b/pkg/restore/manager.go index a1b8ca1..5aa7ae5 100644 --- a/pkg/restore/manager.go +++ b/pkg/restore/manager.go @@ -10,11 +10,11 @@ func NewRestoreManager( clientSet ecosystemInterface, namespace string, recorder eventRecorder, - registry cesRegistry, + globalConfigRepository globalConfigRepository, cleanup cleanupManager, ) *defaultManager { return &defaultManager{ - createManager: newCreateManager(clientSet, namespace, recorder, registry, cleanup), + createManager: newCreateManager(clientSet, namespace, recorder, globalConfigRepository, cleanup), deleteManager: newDeleteManager(clientSet, namespace, recorder), } } diff --git a/pkg/restore/mock_globalConfigRepository_test.go b/pkg/restore/mock_globalConfigRepository_test.go new file mode 100644 index 0000000..80c1402 --- /dev/null +++ b/pkg/restore/mock_globalConfigRepository_test.go @@ -0,0 +1,151 @@ +// Code generated by mockery v2.42.1. DO NOT EDIT. + +package restore + +import ( + context "context" + + config "github.com/cloudogu/k8s-registry-lib/config" + + mock "github.com/stretchr/testify/mock" +) + +// mockGlobalConfigRepository is an autogenerated mock type for the globalConfigRepository type +type mockGlobalConfigRepository struct { + mock.Mock +} + +type mockGlobalConfigRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *mockGlobalConfigRepository) EXPECT() *mockGlobalConfigRepository_Expecter { + return &mockGlobalConfigRepository_Expecter{mock: &_m.Mock} +} + +// Get provides a mock function with given fields: ctx +func (_m *mockGlobalConfigRepository) Get(ctx context.Context) (config.GlobalConfig, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 config.GlobalConfig + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (config.GlobalConfig, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) config.GlobalConfig); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(config.GlobalConfig) + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockGlobalConfigRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type mockGlobalConfigRepository_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockGlobalConfigRepository_Expecter) Get(ctx interface{}) *mockGlobalConfigRepository_Get_Call { + return &mockGlobalConfigRepository_Get_Call{Call: _e.mock.On("Get", ctx)} +} + +func (_c *mockGlobalConfigRepository_Get_Call) Run(run func(ctx context.Context)) *mockGlobalConfigRepository_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockGlobalConfigRepository_Get_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockGlobalConfigRepository_Get_Call) RunAndReturn(run func(context.Context) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Get_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, globalConfig +func (_m *mockGlobalConfigRepository) Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) { + ret := _m.Called(ctx, globalConfig) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 config.GlobalConfig + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)); ok { + return rf(ctx, globalConfig) + } + if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) config.GlobalConfig); ok { + r0 = rf(ctx, globalConfig) + } else { + r0 = ret.Get(0).(config.GlobalConfig) + } + + if rf, ok := ret.Get(1).(func(context.Context, config.GlobalConfig) error); ok { + r1 = rf(ctx, globalConfig) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockGlobalConfigRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type mockGlobalConfigRepository_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - globalConfig config.GlobalConfig +func (_e *mockGlobalConfigRepository_Expecter) Update(ctx interface{}, globalConfig interface{}) *mockGlobalConfigRepository_Update_Call { + return &mockGlobalConfigRepository_Update_Call{Call: _e.mock.On("Update", ctx, globalConfig)} +} + +func (_c *mockGlobalConfigRepository_Update_Call) Run(run func(ctx context.Context, globalConfig config.GlobalConfig)) *mockGlobalConfigRepository_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(config.GlobalConfig)) + }) + return _c +} + +func (_c *mockGlobalConfigRepository_Update_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockGlobalConfigRepository_Update_Call) RunAndReturn(run func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Update_Call { + _c.Call.Return(run) + return _c +} + +// newMockGlobalConfigRepository creates a new instance of mockGlobalConfigRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGlobalConfigRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *mockGlobalConfigRepository { + mock := &mockGlobalConfigRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From 40a63336c53fd4173c49da2cc380720929fc4753 Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 13:49:42 +0200 Subject: [PATCH 04/19] #31 fix tests --- pkg/backup/backupCreateManager_test.go | 6 +-- pkg/backup/backupManager_test.go | 6 +-- pkg/maintenance/maintenance_test.go | 52 +++++++++++++++++--------- pkg/restore/createManager_test.go | 6 +-- pkg/restore/manager_test.go | 6 +-- 5 files changed, 43 insertions(+), 33 deletions(-) diff --git a/pkg/backup/backupCreateManager_test.go b/pkg/backup/backupCreateManager_test.go index 1144bfa..12995ae 100644 --- a/pkg/backup/backupCreateManager_test.go +++ b/pkg/backup/backupCreateManager_test.go @@ -19,12 +19,10 @@ var testCtx = context.TODO() func TestNewBackupCreateManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given - registryMock := newMockEtcdRegistry(t) - globalMock := newMockConfigurationContext(t) - registryMock.EXPECT().GlobalConfig().Return(globalMock) + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) // when - manager := newBackupCreateManager(nil, "", nil, registryMock) + manager := newBackupCreateManager(nil, "", nil, globalConfigRepositoryMock) // then require.NotNil(t, manager) diff --git a/pkg/backup/backupManager_test.go b/pkg/backup/backupManager_test.go index defa29e..9e603dd 100644 --- a/pkg/backup/backupManager_test.go +++ b/pkg/backup/backupManager_test.go @@ -8,12 +8,10 @@ import ( func TestNewBackupManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given - registryMock := newMockEtcdRegistry(t) - globalMock := newMockConfigurationContext(t) - registryMock.EXPECT().GlobalConfig().Return(globalMock) + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) // when - manager := NewBackupManager(nil, testNamespace, nil, registryMock) + manager := NewBackupManager(nil, testNamespace, nil, globalConfigRepositoryMock) // then require.NotNil(t, manager) diff --git a/pkg/maintenance/maintenance_test.go b/pkg/maintenance/maintenance_test.go index 8f3a36a..335b8bd 100644 --- a/pkg/maintenance/maintenance_test.go +++ b/pkg/maintenance/maintenance_test.go @@ -2,7 +2,9 @@ package maintenance import ( "github.com/cloudogu/k8s-backup-operator/pkg/requeue" + "github.com/cloudogu/k8s-registry-lib/config" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "testing" ) @@ -20,13 +22,20 @@ func TestNew(t *testing.T) { func Test_maintenanceSwitch_ActivateMaintenanceMode(t *testing.T) { t.Run("success", func(t *testing.T) { // given - globalConfigMock := newMockGlobalConfig(t) - globalConfigMock.EXPECT().Exists("maintenance").Return(false, nil) - globalConfigMock.EXPECT().Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}").Return(nil) - sut := maintenanceSwitch{globalConfig: globalConfigMock} + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + cfgPrev := config.CreateConfig(make(config.Entries)) + gCfg := config.GlobalConfig{Config: cfgPrev} + cfgAfter := config.CreateConfig(make(config.Entries)) + _, err := cfgAfter.Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}") + assert.NoError(t, err) + gCfgExpected := config.GlobalConfig{Config: cfgAfter} + globalConfigRepositoryMock.EXPECT().Get(mock.Anything).Return(gCfg, nil) + globalConfigRepositoryMock.EXPECT().Update(mock.Anything, mock.Anything).Return(gCfgExpected, nil) + + sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") + err = sut.ActivateMaintenanceMode(testCtx, "title", "text") // then require.NoError(t, err) @@ -34,27 +43,32 @@ func Test_maintenanceSwitch_ActivateMaintenanceMode(t *testing.T) { t.Run("should return error on failing exists", func(t *testing.T) { // given - globalConfigMock := newMockGlobalConfig(t) - globalConfigMock.EXPECT().Exists("maintenance").Return(false, assert.AnError) - sut := maintenanceSwitch{globalConfig: globalConfigMock} + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + cfgPrev := config.CreateConfig(make(config.Entries)) + globalConfigRepositoryMock.EXPECT().Get(testCtx).Return(config.GlobalConfig{cfgPrev}, assert.AnError) + sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} // when err := sut.ActivateMaintenanceMode(testCtx, "title", "text") // then require.Error(t, err) - assert.ErrorContains(t, err, "failed to check if maintenance mode is active") + assert.ErrorContains(t, err, "failed to get global config") assert.ErrorIs(t, err, assert.AnError) }) t.Run("should return a requeueable error is the maintenance mode is active before activation", func(t *testing.T) { // given - globalConfigMock := newMockGlobalConfig(t) - globalConfigMock.EXPECT().Exists("maintenance").Return(true, nil) - sut := maintenanceSwitch{globalConfig: globalConfigMock} + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + cfgAfter := config.CreateConfig(make(config.Entries)) + _, err := cfgAfter.Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}") + assert.NoError(t, err) + gCfgExpected := config.GlobalConfig{Config: cfgAfter} + globalConfigRepositoryMock.EXPECT().Get(testCtx).Return(gCfgExpected, nil) + sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") + err = sut.ActivateMaintenanceMode(testCtx, "title", "text") // then require.Error(t, err) @@ -66,12 +80,16 @@ func Test_maintenanceSwitch_ActivateMaintenanceMode(t *testing.T) { func Test_maintenanceSwitch_DeactivateMaintenanceMode(t *testing.T) { t.Run("success", func(t *testing.T) { // given - globalConfigMock := newMockGlobalConfig(t) - globalConfigMock.EXPECT().Delete("maintenance").Return(nil) - sut := maintenanceSwitch{globalConfig: globalConfigMock} + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + cfgPrev := config.CreateConfig(make(config.Entries)) + _, err := cfgPrev.Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}") + cfgAfter := config.CreateConfig(make(config.Entries)) + globalConfigRepositoryMock.EXPECT().Get(testCtx).Return(config.GlobalConfig{Config: cfgPrev}, nil) + globalConfigRepositoryMock.EXPECT().Update(testCtx, mock.Anything).Return(config.GlobalConfig{Config: cfgAfter}, nil) + sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} // when - err := sut.DeactivateMaintenanceMode(testCtx) + err = sut.DeactivateMaintenanceMode(testCtx) // then require.NoError(t, err) diff --git a/pkg/restore/createManager_test.go b/pkg/restore/createManager_test.go index 4a53a8b..a43ee9c 100644 --- a/pkg/restore/createManager_test.go +++ b/pkg/restore/createManager_test.go @@ -13,9 +13,7 @@ import ( func Test_newCreateManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given - globalConfigMock := newMockConfigurationContext(t) - registryMock := newMockCesRegistry(t) - registryMock.EXPECT().GlobalConfig().Return(globalConfigMock) + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) statefulSetMock := newMockStatefulSetInterface(t) serviceMock := newMockServiceInterface(t) @@ -28,7 +26,7 @@ func Test_newCreateManager(t *testing.T) { clientSetMock.EXPECT().CoreV1().Return(coreV1Mock) // when - manager := newCreateManager(clientSetMock, testNamespace, nil, registryMock, nil) + manager := newCreateManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock, nil) // then require.NotNil(t, manager) diff --git a/pkg/restore/manager_test.go b/pkg/restore/manager_test.go index f32559d..2b81ae2 100644 --- a/pkg/restore/manager_test.go +++ b/pkg/restore/manager_test.go @@ -9,9 +9,7 @@ import ( func TestNewRestoreManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given - registryMock := newMockCesRegistry(t) - globalConfigMock := newMockConfigurationContext(t) - registryMock.EXPECT().GlobalConfig().Return(globalConfigMock) + globalConfigRepositoryMock := newMockGlobalConfigRepository(t) statefulSetMock := newMockStatefulSetInterface(t) serviceMock := newMockServiceInterface(t) @@ -24,7 +22,7 @@ func TestNewRestoreManager(t *testing.T) { clientSetMock.EXPECT().CoreV1().Return(coreV1Mock) // when - manager := NewRestoreManager(clientSetMock, testNamespace, nil, registryMock, nil) + manager := NewRestoreManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock, nil) // then require.NotNil(t, manager) From 536dec2d425ab4625ab70ed19cb6087a18bd4f18 Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 15:13:48 +0200 Subject: [PATCH 05/19] #31 remove etcd out of maintenance looseCoupling --- go.mod | 4 - go.sum | 289 +++------- interfaces.go | 19 +- mock_controllerManager_test.go | 786 -------------------------- mock_etcdContext_test.go | 504 ----------------- mock_etcdRegistry_test.go | 391 ------------- pkg/backup/interfaces.go | 11 - pkg/maintenance/looseCoupling.go | 89 +-- pkg/maintenance/looseCoupling_test.go | 266 +-------- pkg/restore/createManager.go | 2 +- pkg/restore/createManager_test.go | 9 - pkg/restore/manager_test.go | 9 - 12 files changed, 88 insertions(+), 2291 deletions(-) delete mode 100644 mock_controllerManager_test.go delete mode 100644 mock_etcdContext_test.go delete mode 100644 mock_etcdRegistry_test.go diff --git a/go.mod b/go.mod index ef141f4..c0f6324 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/eapache/go-resiliency v1.7.0 // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect @@ -47,7 +46,6 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -75,7 +73,6 @@ require ( golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.6.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -83,7 +80,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.31.0 // indirect - k8s.io/component-base v0.31.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 4b6e90c..5a46f22 100644 --- a/go.sum +++ b/go.sum @@ -1,86 +1,75 @@ -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cloudogu/cesapp-lib v0.12.2 h1:++yK7s69DMCtpIt1nQ2x05cGAe6UH4KnsgEscV7wdq0= -github.com/cloudogu/cesapp-lib v0.12.2/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= github.com/cloudogu/cesapp-lib v0.14.0 h1:955cU7ivgiSJGPJ36/YHhbrT0d7Km+7BwOITPrAJijo= github.com/cloudogu/cesapp-lib v0.14.0/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= github.com/cloudogu/k8s-registry-lib v0.4.1 h1:V5fOMIYYH1XqwNQ0NjTWViD1G4R146KQVjIuCuPO5dc= github.com/cloudogu/k8s-registry-lib v0.4.1/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0= -github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo= github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= -github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/docker/docker v27.2.0+incompatible h1:Rk9nIVdfH3+Vz4cyI/uhbINhEZ/oLmc+CBXmH6fbNk4= +github.com/docker/docker v27.2.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/eapache/go-resiliency v1.7.0 h1:n3NRTnBn5N0Cbi/IeOHuQn9s2UwVUH7Ga0ZWcP+9JTA= github.com/eapache/go-resiliency v1.7.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= -github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= -github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= -github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -94,10 +83,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= @@ -105,19 +90,14 @@ github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYu github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -129,23 +109,37 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lufia/plan9stats v0.0.0-20240819163618-b1d8f4d146e7 h1:5RK988zAqB3/AN3opGfRpoQgAVqr6/A5+qRTi67VUZY= +github.com/lufia/plan9stats v0.0.0-20240819163618-b1d8f4d146e7/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= +github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -155,151 +149,108 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA= -github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= +github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw= +github.com/testcontainers/testcontainers-go v0.33.0/go.mod h1:W80YpTa8D5C3Yy16icheD01UTDu+LmXIA2Keo+jWtT8= +github.com/testcontainers/testcontainers-go/modules/k3s v0.33.0 h1:vKz46Z+vClMc6MNnwpcw8tNjOOprJxWzsn4J+1noTM4= +github.com/testcontainers/testcontainers-go/modules/k3s v0.33.0/go.mod h1:3ePe1rQStxDjBKN05hxN+5Z16hNf+Iu38uIxABmIGk0= +github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= +github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= +github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= +github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= github.com/vmware-tanzu/velero v1.12.1 h1:WKmSmyE5haJpQMuw+RzA3bNTGHZP80jnDEJutsthmF8= github.com/vmware-tanzu/velero v1.12.1/go.mod h1:/DciEpV9LMokDQoZAp+bH4CQInmFyw3cU2CKiqrHghs= -github.com/vmware-tanzu/velero v1.14.1 h1:HYj73scn7ZqtfTanjW/X4W0Hn3w/qcfoRbrHCWM52iI= -github.com/vmware-tanzu/velero v1.14.1/go.mod h1:/OzHzTvbevkkX+bK/BS4AgYMv6nKuOgsybuuvLWkSS0= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= -go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= -go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= -go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= -go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= -go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= -go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= -go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= -golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= -golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -308,49 +259,23 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -359,24 +284,15 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= @@ -396,70 +312,25 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= -k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= -k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= -k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= -k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= -k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= -k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= -k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= -k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= -k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 h1:GKE9U8BH16uynoxQii0auTjmmmuZ3O0LFMN6S0lPPhI= k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= -sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= -sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/interfaces.go b/interfaces.go index 6708ecc..b4c7e10 100644 --- a/interfaces.go +++ b/interfaces.go @@ -1,7 +1,6 @@ package main import ( - "github.com/cloudogu/cesapp-lib/registry" "github.com/cloudogu/k8s-backup-operator/pkg/additionalimages" "github.com/cloudogu/k8s-backup-operator/pkg/cleanup" "github.com/cloudogu/k8s-backup-operator/pkg/garbagecollection" @@ -16,12 +15,14 @@ type eventRecorder interface { record.EventRecorder } +// used for mocks + +//nolint:unused +//goland:noinspection GoUnusedType type controllerManager interface { manager.Manager } -// used for mocks - //nolint:unused //goland:noinspection GoUnusedType type scheduledBackupManager interface { @@ -52,18 +53,6 @@ type additionalImageUpdater interface { additionalimages.Updater } -//nolint:unused -//goland:noinspection GoUnusedType -type etcdRegistry interface { - registry.Registry -} - -//nolint:unused -//goland:noinspection GoUnusedType -type etcdContext interface { - registry.ConfigurationContext -} - //nolint:unused //goland:noinspection GoUnusedType type k8sClient interface { diff --git a/mock_controllerManager_test.go b/mock_controllerManager_test.go deleted file mode 100644 index ae04a08..0000000 --- a/mock_controllerManager_test.go +++ /dev/null @@ -1,786 +0,0 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. - -package main - -import ( - cache "sigs.k8s.io/controller-runtime/pkg/cache" - client "sigs.k8s.io/controller-runtime/pkg/client" - - config "sigs.k8s.io/controller-runtime/pkg/config" - - context "context" - - healthz "sigs.k8s.io/controller-runtime/pkg/healthz" - - http "net/http" - - logr "github.com/go-logr/logr" - - manager "sigs.k8s.io/controller-runtime/pkg/manager" - - meta "k8s.io/apimachinery/pkg/api/meta" - - mock "github.com/stretchr/testify/mock" - - record "k8s.io/client-go/tools/record" - - rest "k8s.io/client-go/rest" - - runtime "k8s.io/apimachinery/pkg/runtime" - - webhook "sigs.k8s.io/controller-runtime/pkg/webhook" -) - -// mockControllerManager is an autogenerated mock type for the controllerManager type -type mockControllerManager struct { - mock.Mock -} - -type mockControllerManager_Expecter struct { - mock *mock.Mock -} - -func (_m *mockControllerManager) EXPECT() *mockControllerManager_Expecter { - return &mockControllerManager_Expecter{mock: &_m.Mock} -} - -// Add provides a mock function with given fields: _a0 -func (_m *mockControllerManager) Add(_a0 manager.Runnable) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(manager.Runnable) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockControllerManager_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' -type mockControllerManager_Add_Call struct { - *mock.Call -} - -// Add is a helper method to define mock.On call -// - _a0 manager.Runnable -func (_e *mockControllerManager_Expecter) Add(_a0 interface{}) *mockControllerManager_Add_Call { - return &mockControllerManager_Add_Call{Call: _e.mock.On("Add", _a0)} -} - -func (_c *mockControllerManager_Add_Call) Run(run func(_a0 manager.Runnable)) *mockControllerManager_Add_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(manager.Runnable)) - }) - return _c -} - -func (_c *mockControllerManager_Add_Call) Return(_a0 error) *mockControllerManager_Add_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_Add_Call) RunAndReturn(run func(manager.Runnable) error) *mockControllerManager_Add_Call { - _c.Call.Return(run) - return _c -} - -// AddHealthzCheck provides a mock function with given fields: name, check -func (_m *mockControllerManager) AddHealthzCheck(name string, check healthz.Checker) error { - ret := _m.Called(name, check) - - var r0 error - if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { - r0 = rf(name, check) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockControllerManager_AddHealthzCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddHealthzCheck' -type mockControllerManager_AddHealthzCheck_Call struct { - *mock.Call -} - -// AddHealthzCheck is a helper method to define mock.On call -// - name string -// - check healthz.Checker -func (_e *mockControllerManager_Expecter) AddHealthzCheck(name interface{}, check interface{}) *mockControllerManager_AddHealthzCheck_Call { - return &mockControllerManager_AddHealthzCheck_Call{Call: _e.mock.On("AddHealthzCheck", name, check)} -} - -func (_c *mockControllerManager_AddHealthzCheck_Call) Run(run func(name string, check healthz.Checker)) *mockControllerManager_AddHealthzCheck_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(healthz.Checker)) - }) - return _c -} - -func (_c *mockControllerManager_AddHealthzCheck_Call) Return(_a0 error) *mockControllerManager_AddHealthzCheck_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_AddHealthzCheck_Call) RunAndReturn(run func(string, healthz.Checker) error) *mockControllerManager_AddHealthzCheck_Call { - _c.Call.Return(run) - return _c -} - -// AddReadyzCheck provides a mock function with given fields: name, check -func (_m *mockControllerManager) AddReadyzCheck(name string, check healthz.Checker) error { - ret := _m.Called(name, check) - - var r0 error - if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { - r0 = rf(name, check) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockControllerManager_AddReadyzCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReadyzCheck' -type mockControllerManager_AddReadyzCheck_Call struct { - *mock.Call -} - -// AddReadyzCheck is a helper method to define mock.On call -// - name string -// - check healthz.Checker -func (_e *mockControllerManager_Expecter) AddReadyzCheck(name interface{}, check interface{}) *mockControllerManager_AddReadyzCheck_Call { - return &mockControllerManager_AddReadyzCheck_Call{Call: _e.mock.On("AddReadyzCheck", name, check)} -} - -func (_c *mockControllerManager_AddReadyzCheck_Call) Run(run func(name string, check healthz.Checker)) *mockControllerManager_AddReadyzCheck_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(healthz.Checker)) - }) - return _c -} - -func (_c *mockControllerManager_AddReadyzCheck_Call) Return(_a0 error) *mockControllerManager_AddReadyzCheck_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_AddReadyzCheck_Call) RunAndReturn(run func(string, healthz.Checker) error) *mockControllerManager_AddReadyzCheck_Call { - _c.Call.Return(run) - return _c -} - -// Elected provides a mock function with given fields: -func (_m *mockControllerManager) Elected() <-chan struct{} { - ret := _m.Called() - - var r0 <-chan struct{} - if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan struct{}) - } - } - - return r0 -} - -// mockControllerManager_Elected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Elected' -type mockControllerManager_Elected_Call struct { - *mock.Call -} - -// Elected is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) Elected() *mockControllerManager_Elected_Call { - return &mockControllerManager_Elected_Call{Call: _e.mock.On("Elected")} -} - -func (_c *mockControllerManager_Elected_Call) Run(run func()) *mockControllerManager_Elected_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_Elected_Call) Return(_a0 <-chan struct{}) *mockControllerManager_Elected_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_Elected_Call) RunAndReturn(run func() <-chan struct{}) *mockControllerManager_Elected_Call { - _c.Call.Return(run) - return _c -} - -// GetAPIReader provides a mock function with given fields: -func (_m *mockControllerManager) GetAPIReader() client.Reader { - ret := _m.Called() - - var r0 client.Reader - if rf, ok := ret.Get(0).(func() client.Reader); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(client.Reader) - } - } - - return r0 -} - -// mockControllerManager_GetAPIReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAPIReader' -type mockControllerManager_GetAPIReader_Call struct { - *mock.Call -} - -// GetAPIReader is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetAPIReader() *mockControllerManager_GetAPIReader_Call { - return &mockControllerManager_GetAPIReader_Call{Call: _e.mock.On("GetAPIReader")} -} - -func (_c *mockControllerManager_GetAPIReader_Call) Run(run func()) *mockControllerManager_GetAPIReader_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetAPIReader_Call) Return(_a0 client.Reader) *mockControllerManager_GetAPIReader_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetAPIReader_Call) RunAndReturn(run func() client.Reader) *mockControllerManager_GetAPIReader_Call { - _c.Call.Return(run) - return _c -} - -// GetCache provides a mock function with given fields: -func (_m *mockControllerManager) GetCache() cache.Cache { - ret := _m.Called() - - var r0 cache.Cache - if rf, ok := ret.Get(0).(func() cache.Cache); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cache.Cache) - } - } - - return r0 -} - -// mockControllerManager_GetCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCache' -type mockControllerManager_GetCache_Call struct { - *mock.Call -} - -// GetCache is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetCache() *mockControllerManager_GetCache_Call { - return &mockControllerManager_GetCache_Call{Call: _e.mock.On("GetCache")} -} - -func (_c *mockControllerManager_GetCache_Call) Run(run func()) *mockControllerManager_GetCache_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetCache_Call) Return(_a0 cache.Cache) *mockControllerManager_GetCache_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetCache_Call) RunAndReturn(run func() cache.Cache) *mockControllerManager_GetCache_Call { - _c.Call.Return(run) - return _c -} - -// GetClient provides a mock function with given fields: -func (_m *mockControllerManager) GetClient() client.Client { - ret := _m.Called() - - var r0 client.Client - if rf, ok := ret.Get(0).(func() client.Client); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(client.Client) - } - } - - return r0 -} - -// mockControllerManager_GetClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClient' -type mockControllerManager_GetClient_Call struct { - *mock.Call -} - -// GetClient is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetClient() *mockControllerManager_GetClient_Call { - return &mockControllerManager_GetClient_Call{Call: _e.mock.On("GetClient")} -} - -func (_c *mockControllerManager_GetClient_Call) Run(run func()) *mockControllerManager_GetClient_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetClient_Call) Return(_a0 client.Client) *mockControllerManager_GetClient_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetClient_Call) RunAndReturn(run func() client.Client) *mockControllerManager_GetClient_Call { - _c.Call.Return(run) - return _c -} - -// GetConfig provides a mock function with given fields: -func (_m *mockControllerManager) GetConfig() *rest.Config { - ret := _m.Called() - - var r0 *rest.Config - if rf, ok := ret.Get(0).(func() *rest.Config); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*rest.Config) - } - } - - return r0 -} - -// mockControllerManager_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' -type mockControllerManager_GetConfig_Call struct { - *mock.Call -} - -// GetConfig is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetConfig() *mockControllerManager_GetConfig_Call { - return &mockControllerManager_GetConfig_Call{Call: _e.mock.On("GetConfig")} -} - -func (_c *mockControllerManager_GetConfig_Call) Run(run func()) *mockControllerManager_GetConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetConfig_Call) Return(_a0 *rest.Config) *mockControllerManager_GetConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetConfig_Call) RunAndReturn(run func() *rest.Config) *mockControllerManager_GetConfig_Call { - _c.Call.Return(run) - return _c -} - -// GetControllerOptions provides a mock function with given fields: -func (_m *mockControllerManager) GetControllerOptions() config.Controller { - ret := _m.Called() - - var r0 config.Controller - if rf, ok := ret.Get(0).(func() config.Controller); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(config.Controller) - } - - return r0 -} - -// mockControllerManager_GetControllerOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetControllerOptions' -type mockControllerManager_GetControllerOptions_Call struct { - *mock.Call -} - -// GetControllerOptions is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetControllerOptions() *mockControllerManager_GetControllerOptions_Call { - return &mockControllerManager_GetControllerOptions_Call{Call: _e.mock.On("GetControllerOptions")} -} - -func (_c *mockControllerManager_GetControllerOptions_Call) Run(run func()) *mockControllerManager_GetControllerOptions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetControllerOptions_Call) Return(_a0 config.Controller) *mockControllerManager_GetControllerOptions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetControllerOptions_Call) RunAndReturn(run func() config.Controller) *mockControllerManager_GetControllerOptions_Call { - _c.Call.Return(run) - return _c -} - -// GetEventRecorderFor provides a mock function with given fields: name -func (_m *mockControllerManager) GetEventRecorderFor(name string) record.EventRecorder { - ret := _m.Called(name) - - var r0 record.EventRecorder - if rf, ok := ret.Get(0).(func(string) record.EventRecorder); ok { - r0 = rf(name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(record.EventRecorder) - } - } - - return r0 -} - -// mockControllerManager_GetEventRecorderFor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventRecorderFor' -type mockControllerManager_GetEventRecorderFor_Call struct { - *mock.Call -} - -// GetEventRecorderFor is a helper method to define mock.On call -// - name string -func (_e *mockControllerManager_Expecter) GetEventRecorderFor(name interface{}) *mockControllerManager_GetEventRecorderFor_Call { - return &mockControllerManager_GetEventRecorderFor_Call{Call: _e.mock.On("GetEventRecorderFor", name)} -} - -func (_c *mockControllerManager_GetEventRecorderFor_Call) Run(run func(name string)) *mockControllerManager_GetEventRecorderFor_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockControllerManager_GetEventRecorderFor_Call) Return(_a0 record.EventRecorder) *mockControllerManager_GetEventRecorderFor_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetEventRecorderFor_Call) RunAndReturn(run func(string) record.EventRecorder) *mockControllerManager_GetEventRecorderFor_Call { - _c.Call.Return(run) - return _c -} - -// GetFieldIndexer provides a mock function with given fields: -func (_m *mockControllerManager) GetFieldIndexer() client.FieldIndexer { - ret := _m.Called() - - var r0 client.FieldIndexer - if rf, ok := ret.Get(0).(func() client.FieldIndexer); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(client.FieldIndexer) - } - } - - return r0 -} - -// mockControllerManager_GetFieldIndexer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFieldIndexer' -type mockControllerManager_GetFieldIndexer_Call struct { - *mock.Call -} - -// GetFieldIndexer is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetFieldIndexer() *mockControllerManager_GetFieldIndexer_Call { - return &mockControllerManager_GetFieldIndexer_Call{Call: _e.mock.On("GetFieldIndexer")} -} - -func (_c *mockControllerManager_GetFieldIndexer_Call) Run(run func()) *mockControllerManager_GetFieldIndexer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetFieldIndexer_Call) Return(_a0 client.FieldIndexer) *mockControllerManager_GetFieldIndexer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetFieldIndexer_Call) RunAndReturn(run func() client.FieldIndexer) *mockControllerManager_GetFieldIndexer_Call { - _c.Call.Return(run) - return _c -} - -// GetHTTPClient provides a mock function with given fields: -func (_m *mockControllerManager) GetHTTPClient() *http.Client { - ret := _m.Called() - - var r0 *http.Client - if rf, ok := ret.Get(0).(func() *http.Client); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*http.Client) - } - } - - return r0 -} - -// mockControllerManager_GetHTTPClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHTTPClient' -type mockControllerManager_GetHTTPClient_Call struct { - *mock.Call -} - -// GetHTTPClient is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetHTTPClient() *mockControllerManager_GetHTTPClient_Call { - return &mockControllerManager_GetHTTPClient_Call{Call: _e.mock.On("GetHTTPClient")} -} - -func (_c *mockControllerManager_GetHTTPClient_Call) Run(run func()) *mockControllerManager_GetHTTPClient_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetHTTPClient_Call) Return(_a0 *http.Client) *mockControllerManager_GetHTTPClient_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetHTTPClient_Call) RunAndReturn(run func() *http.Client) *mockControllerManager_GetHTTPClient_Call { - _c.Call.Return(run) - return _c -} - -// GetLogger provides a mock function with given fields: -func (_m *mockControllerManager) GetLogger() logr.Logger { - ret := _m.Called() - - var r0 logr.Logger - if rf, ok := ret.Get(0).(func() logr.Logger); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(logr.Logger) - } - - return r0 -} - -// mockControllerManager_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger' -type mockControllerManager_GetLogger_Call struct { - *mock.Call -} - -// GetLogger is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetLogger() *mockControllerManager_GetLogger_Call { - return &mockControllerManager_GetLogger_Call{Call: _e.mock.On("GetLogger")} -} - -func (_c *mockControllerManager_GetLogger_Call) Run(run func()) *mockControllerManager_GetLogger_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetLogger_Call) Return(_a0 logr.Logger) *mockControllerManager_GetLogger_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetLogger_Call) RunAndReturn(run func() logr.Logger) *mockControllerManager_GetLogger_Call { - _c.Call.Return(run) - return _c -} - -// GetRESTMapper provides a mock function with given fields: -func (_m *mockControllerManager) GetRESTMapper() meta.RESTMapper { - ret := _m.Called() - - var r0 meta.RESTMapper - if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(meta.RESTMapper) - } - } - - return r0 -} - -// mockControllerManager_GetRESTMapper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRESTMapper' -type mockControllerManager_GetRESTMapper_Call struct { - *mock.Call -} - -// GetRESTMapper is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetRESTMapper() *mockControllerManager_GetRESTMapper_Call { - return &mockControllerManager_GetRESTMapper_Call{Call: _e.mock.On("GetRESTMapper")} -} - -func (_c *mockControllerManager_GetRESTMapper_Call) Run(run func()) *mockControllerManager_GetRESTMapper_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetRESTMapper_Call) Return(_a0 meta.RESTMapper) *mockControllerManager_GetRESTMapper_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetRESTMapper_Call) RunAndReturn(run func() meta.RESTMapper) *mockControllerManager_GetRESTMapper_Call { - _c.Call.Return(run) - return _c -} - -// GetScheme provides a mock function with given fields: -func (_m *mockControllerManager) GetScheme() *runtime.Scheme { - ret := _m.Called() - - var r0 *runtime.Scheme - if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*runtime.Scheme) - } - } - - return r0 -} - -// mockControllerManager_GetScheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetScheme' -type mockControllerManager_GetScheme_Call struct { - *mock.Call -} - -// GetScheme is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetScheme() *mockControllerManager_GetScheme_Call { - return &mockControllerManager_GetScheme_Call{Call: _e.mock.On("GetScheme")} -} - -func (_c *mockControllerManager_GetScheme_Call) Run(run func()) *mockControllerManager_GetScheme_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetScheme_Call) Return(_a0 *runtime.Scheme) *mockControllerManager_GetScheme_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetScheme_Call) RunAndReturn(run func() *runtime.Scheme) *mockControllerManager_GetScheme_Call { - _c.Call.Return(run) - return _c -} - -// GetWebhookServer provides a mock function with given fields: -func (_m *mockControllerManager) GetWebhookServer() webhook.Server { - ret := _m.Called() - - var r0 webhook.Server - if rf, ok := ret.Get(0).(func() webhook.Server); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(webhook.Server) - } - } - - return r0 -} - -// mockControllerManager_GetWebhookServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWebhookServer' -type mockControllerManager_GetWebhookServer_Call struct { - *mock.Call -} - -// GetWebhookServer is a helper method to define mock.On call -func (_e *mockControllerManager_Expecter) GetWebhookServer() *mockControllerManager_GetWebhookServer_Call { - return &mockControllerManager_GetWebhookServer_Call{Call: _e.mock.On("GetWebhookServer")} -} - -func (_c *mockControllerManager_GetWebhookServer_Call) Run(run func()) *mockControllerManager_GetWebhookServer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockControllerManager_GetWebhookServer_Call) Return(_a0 webhook.Server) *mockControllerManager_GetWebhookServer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_GetWebhookServer_Call) RunAndReturn(run func() webhook.Server) *mockControllerManager_GetWebhookServer_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: ctx -func (_m *mockControllerManager) Start(ctx context.Context) error { - ret := _m.Called(ctx) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockControllerManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type mockControllerManager_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - ctx context.Context -func (_e *mockControllerManager_Expecter) Start(ctx interface{}) *mockControllerManager_Start_Call { - return &mockControllerManager_Start_Call{Call: _e.mock.On("Start", ctx)} -} - -func (_c *mockControllerManager_Start_Call) Run(run func(ctx context.Context)) *mockControllerManager_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *mockControllerManager_Start_Call) Return(_a0 error) *mockControllerManager_Start_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockControllerManager_Start_Call) RunAndReturn(run func(context.Context) error) *mockControllerManager_Start_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTnewMockControllerManager interface { - mock.TestingT - Cleanup(func()) -} - -// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockControllerManager(t mockConstructorTestingTnewMockControllerManager) *mockControllerManager { - mock := &mockControllerManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mock_etcdContext_test.go b/mock_etcdContext_test.go deleted file mode 100644 index dac6cea..0000000 --- a/mock_etcdContext_test.go +++ /dev/null @@ -1,504 +0,0 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. - -package main - -import mock "github.com/stretchr/testify/mock" - -// mockEtcdContext is an autogenerated mock type for the etcdContext type -type mockEtcdContext struct { - mock.Mock -} - -type mockEtcdContext_Expecter struct { - mock *mock.Mock -} - -func (_m *mockEtcdContext) EXPECT() *mockEtcdContext_Expecter { - return &mockEtcdContext_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: key -func (_m *mockEtcdContext) Delete(key string) error { - ret := _m.Called(key) - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockEtcdContext_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type mockEtcdContext_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - key string -func (_e *mockEtcdContext_Expecter) Delete(key interface{}) *mockEtcdContext_Delete_Call { - return &mockEtcdContext_Delete_Call{Call: _e.mock.On("Delete", key)} -} - -func (_c *mockEtcdContext_Delete_Call) Run(run func(key string)) *mockEtcdContext_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdContext_Delete_Call) Return(_a0 error) *mockEtcdContext_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdContext_Delete_Call) RunAndReturn(run func(string) error) *mockEtcdContext_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRecursive provides a mock function with given fields: key -func (_m *mockEtcdContext) DeleteRecursive(key string) error { - ret := _m.Called(key) - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockEtcdContext_DeleteRecursive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRecursive' -type mockEtcdContext_DeleteRecursive_Call struct { - *mock.Call -} - -// DeleteRecursive is a helper method to define mock.On call -// - key string -func (_e *mockEtcdContext_Expecter) DeleteRecursive(key interface{}) *mockEtcdContext_DeleteRecursive_Call { - return &mockEtcdContext_DeleteRecursive_Call{Call: _e.mock.On("DeleteRecursive", key)} -} - -func (_c *mockEtcdContext_DeleteRecursive_Call) Run(run func(key string)) *mockEtcdContext_DeleteRecursive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdContext_DeleteRecursive_Call) Return(_a0 error) *mockEtcdContext_DeleteRecursive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdContext_DeleteRecursive_Call) RunAndReturn(run func(string) error) *mockEtcdContext_DeleteRecursive_Call { - _c.Call.Return(run) - return _c -} - -// Exists provides a mock function with given fields: key -func (_m *mockEtcdContext) Exists(key string) (bool, error) { - ret := _m.Called(key) - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockEtcdContext_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' -type mockEtcdContext_Exists_Call struct { - *mock.Call -} - -// Exists is a helper method to define mock.On call -// - key string -func (_e *mockEtcdContext_Expecter) Exists(key interface{}) *mockEtcdContext_Exists_Call { - return &mockEtcdContext_Exists_Call{Call: _e.mock.On("Exists", key)} -} - -func (_c *mockEtcdContext_Exists_Call) Run(run func(key string)) *mockEtcdContext_Exists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdContext_Exists_Call) Return(_a0 bool, _a1 error) *mockEtcdContext_Exists_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockEtcdContext_Exists_Call) RunAndReturn(run func(string) (bool, error)) *mockEtcdContext_Exists_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: key -func (_m *mockEtcdContext) Get(key string) (string, error) { - ret := _m.Called(key) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockEtcdContext_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockEtcdContext_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - key string -func (_e *mockEtcdContext_Expecter) Get(key interface{}) *mockEtcdContext_Get_Call { - return &mockEtcdContext_Get_Call{Call: _e.mock.On("Get", key)} -} - -func (_c *mockEtcdContext_Get_Call) Run(run func(key string)) *mockEtcdContext_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdContext_Get_Call) Return(_a0 string, _a1 error) *mockEtcdContext_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockEtcdContext_Get_Call) RunAndReturn(run func(string) (string, error)) *mockEtcdContext_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetAll provides a mock function with given fields: -func (_m *mockEtcdContext) GetAll() (map[string]string, error) { - ret := _m.Called() - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() map[string]string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockEtcdContext_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' -type mockEtcdContext_GetAll_Call struct { - *mock.Call -} - -// GetAll is a helper method to define mock.On call -func (_e *mockEtcdContext_Expecter) GetAll() *mockEtcdContext_GetAll_Call { - return &mockEtcdContext_GetAll_Call{Call: _e.mock.On("GetAll")} -} - -func (_c *mockEtcdContext_GetAll_Call) Run(run func()) *mockEtcdContext_GetAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdContext_GetAll_Call) Return(_a0 map[string]string, _a1 error) *mockEtcdContext_GetAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockEtcdContext_GetAll_Call) RunAndReturn(run func() (map[string]string, error)) *mockEtcdContext_GetAll_Call { - _c.Call.Return(run) - return _c -} - -// GetOrFalse provides a mock function with given fields: key -func (_m *mockEtcdContext) GetOrFalse(key string) (bool, string, error) { - ret := _m.Called(key) - - var r0 bool - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(string) (bool, string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) string); ok { - r1 = rf(key) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(string) error); ok { - r2 = rf(key) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// mockEtcdContext_GetOrFalse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrFalse' -type mockEtcdContext_GetOrFalse_Call struct { - *mock.Call -} - -// GetOrFalse is a helper method to define mock.On call -// - key string -func (_e *mockEtcdContext_Expecter) GetOrFalse(key interface{}) *mockEtcdContext_GetOrFalse_Call { - return &mockEtcdContext_GetOrFalse_Call{Call: _e.mock.On("GetOrFalse", key)} -} - -func (_c *mockEtcdContext_GetOrFalse_Call) Run(run func(key string)) *mockEtcdContext_GetOrFalse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdContext_GetOrFalse_Call) Return(_a0 bool, _a1 string, _a2 error) *mockEtcdContext_GetOrFalse_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *mockEtcdContext_GetOrFalse_Call) RunAndReturn(run func(string) (bool, string, error)) *mockEtcdContext_GetOrFalse_Call { - _c.Call.Return(run) - return _c -} - -// Refresh provides a mock function with given fields: key, timeToLiveInSeconds -func (_m *mockEtcdContext) Refresh(key string, timeToLiveInSeconds int) error { - ret := _m.Called(key, timeToLiveInSeconds) - - var r0 error - if rf, ok := ret.Get(0).(func(string, int) error); ok { - r0 = rf(key, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockEtcdContext_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh' -type mockEtcdContext_Refresh_Call struct { - *mock.Call -} - -// Refresh is a helper method to define mock.On call -// - key string -// - timeToLiveInSeconds int -func (_e *mockEtcdContext_Expecter) Refresh(key interface{}, timeToLiveInSeconds interface{}) *mockEtcdContext_Refresh_Call { - return &mockEtcdContext_Refresh_Call{Call: _e.mock.On("Refresh", key, timeToLiveInSeconds)} -} - -func (_c *mockEtcdContext_Refresh_Call) Run(run func(key string, timeToLiveInSeconds int)) *mockEtcdContext_Refresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(int)) - }) - return _c -} - -func (_c *mockEtcdContext_Refresh_Call) Return(_a0 error) *mockEtcdContext_Refresh_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdContext_Refresh_Call) RunAndReturn(run func(string, int) error) *mockEtcdContext_Refresh_Call { - _c.Call.Return(run) - return _c -} - -// RemoveAll provides a mock function with given fields: -func (_m *mockEtcdContext) RemoveAll() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockEtcdContext_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' -type mockEtcdContext_RemoveAll_Call struct { - *mock.Call -} - -// RemoveAll is a helper method to define mock.On call -func (_e *mockEtcdContext_Expecter) RemoveAll() *mockEtcdContext_RemoveAll_Call { - return &mockEtcdContext_RemoveAll_Call{Call: _e.mock.On("RemoveAll")} -} - -func (_c *mockEtcdContext_RemoveAll_Call) Run(run func()) *mockEtcdContext_RemoveAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdContext_RemoveAll_Call) Return(_a0 error) *mockEtcdContext_RemoveAll_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdContext_RemoveAll_Call) RunAndReturn(run func() error) *mockEtcdContext_RemoveAll_Call { - _c.Call.Return(run) - return _c -} - -// Set provides a mock function with given fields: key, value -func (_m *mockEtcdContext) Set(key string, value string) error { - ret := _m.Called(key, value) - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(key, value) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockEtcdContext_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type mockEtcdContext_Set_Call struct { - *mock.Call -} - -// Set is a helper method to define mock.On call -// - key string -// - value string -func (_e *mockEtcdContext_Expecter) Set(key interface{}, value interface{}) *mockEtcdContext_Set_Call { - return &mockEtcdContext_Set_Call{Call: _e.mock.On("Set", key, value)} -} - -func (_c *mockEtcdContext_Set_Call) Run(run func(key string, value string)) *mockEtcdContext_Set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *mockEtcdContext_Set_Call) Return(_a0 error) *mockEtcdContext_Set_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdContext_Set_Call) RunAndReturn(run func(string, string) error) *mockEtcdContext_Set_Call { - _c.Call.Return(run) - return _c -} - -// SetWithLifetime provides a mock function with given fields: key, value, timeToLiveInSeconds -func (_m *mockEtcdContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { - ret := _m.Called(key, value, timeToLiveInSeconds) - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, int) error); ok { - r0 = rf(key, value, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockEtcdContext_SetWithLifetime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWithLifetime' -type mockEtcdContext_SetWithLifetime_Call struct { - *mock.Call -} - -// SetWithLifetime is a helper method to define mock.On call -// - key string -// - value string -// - timeToLiveInSeconds int -func (_e *mockEtcdContext_Expecter) SetWithLifetime(key interface{}, value interface{}, timeToLiveInSeconds interface{}) *mockEtcdContext_SetWithLifetime_Call { - return &mockEtcdContext_SetWithLifetime_Call{Call: _e.mock.On("SetWithLifetime", key, value, timeToLiveInSeconds)} -} - -func (_c *mockEtcdContext_SetWithLifetime_Call) Run(run func(key string, value string, timeToLiveInSeconds int)) *mockEtcdContext_SetWithLifetime_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *mockEtcdContext_SetWithLifetime_Call) Return(_a0 error) *mockEtcdContext_SetWithLifetime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdContext_SetWithLifetime_Call) RunAndReturn(run func(string, string, int) error) *mockEtcdContext_SetWithLifetime_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTnewMockEtcdContext interface { - mock.TestingT - Cleanup(func()) -} - -// newMockEtcdContext creates a new instance of mockEtcdContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEtcdContext(t mockConstructorTestingTnewMockEtcdContext) *mockEtcdContext { - mock := &mockEtcdContext{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mock_etcdRegistry_test.go b/mock_etcdRegistry_test.go deleted file mode 100644 index b6970c4..0000000 --- a/mock_etcdRegistry_test.go +++ /dev/null @@ -1,391 +0,0 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. - -package main - -import ( - registry "github.com/cloudogu/cesapp-lib/registry" - mock "github.com/stretchr/testify/mock" -) - -// mockEtcdRegistry is an autogenerated mock type for the etcdRegistry type -type mockEtcdRegistry struct { - mock.Mock -} - -type mockEtcdRegistry_Expecter struct { - mock *mock.Mock -} - -func (_m *mockEtcdRegistry) EXPECT() *mockEtcdRegistry_Expecter { - return &mockEtcdRegistry_Expecter{mock: &_m.Mock} -} - -// BlueprintRegistry provides a mock function with given fields: -func (_m *mockEtcdRegistry) BlueprintRegistry() registry.ConfigurationContext { - ret := _m.Called() - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_BlueprintRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlueprintRegistry' -type mockEtcdRegistry_BlueprintRegistry_Call struct { - *mock.Call -} - -// BlueprintRegistry is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) BlueprintRegistry() *mockEtcdRegistry_BlueprintRegistry_Call { - return &mockEtcdRegistry_BlueprintRegistry_Call{Call: _e.mock.On("BlueprintRegistry")} -} - -func (_c *mockEtcdRegistry_BlueprintRegistry_Call) Run(run func()) *mockEtcdRegistry_BlueprintRegistry_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_BlueprintRegistry_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_BlueprintRegistry_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_BlueprintRegistry_Call) RunAndReturn(run func() registry.ConfigurationContext) *mockEtcdRegistry_BlueprintRegistry_Call { - _c.Call.Return(run) - return _c -} - -// DoguConfig provides a mock function with given fields: dogu -func (_m *mockEtcdRegistry) DoguConfig(dogu string) registry.ConfigurationContext { - ret := _m.Called(dogu) - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { - r0 = rf(dogu) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_DoguConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoguConfig' -type mockEtcdRegistry_DoguConfig_Call struct { - *mock.Call -} - -// DoguConfig is a helper method to define mock.On call -// - dogu string -func (_e *mockEtcdRegistry_Expecter) DoguConfig(dogu interface{}) *mockEtcdRegistry_DoguConfig_Call { - return &mockEtcdRegistry_DoguConfig_Call{Call: _e.mock.On("DoguConfig", dogu)} -} - -func (_c *mockEtcdRegistry_DoguConfig_Call) Run(run func(dogu string)) *mockEtcdRegistry_DoguConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdRegistry_DoguConfig_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_DoguConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_DoguConfig_Call) RunAndReturn(run func(string) registry.ConfigurationContext) *mockEtcdRegistry_DoguConfig_Call { - _c.Call.Return(run) - return _c -} - -// DoguRegistry provides a mock function with given fields: -func (_m *mockEtcdRegistry) DoguRegistry() registry.DoguRegistry { - ret := _m.Called() - - var r0 registry.DoguRegistry - if rf, ok := ret.Get(0).(func() registry.DoguRegistry); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.DoguRegistry) - } - } - - return r0 -} - -// mockEtcdRegistry_DoguRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoguRegistry' -type mockEtcdRegistry_DoguRegistry_Call struct { - *mock.Call -} - -// DoguRegistry is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) DoguRegistry() *mockEtcdRegistry_DoguRegistry_Call { - return &mockEtcdRegistry_DoguRegistry_Call{Call: _e.mock.On("DoguRegistry")} -} - -func (_c *mockEtcdRegistry_DoguRegistry_Call) Run(run func()) *mockEtcdRegistry_DoguRegistry_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_DoguRegistry_Call) Return(_a0 registry.DoguRegistry) *mockEtcdRegistry_DoguRegistry_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_DoguRegistry_Call) RunAndReturn(run func() registry.DoguRegistry) *mockEtcdRegistry_DoguRegistry_Call { - _c.Call.Return(run) - return _c -} - -// GetNode provides a mock function with given fields: -func (_m *mockEtcdRegistry) GetNode() (registry.Node, error) { - ret := _m.Called() - - var r0 registry.Node - var r1 error - if rf, ok := ret.Get(0).(func() (registry.Node, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() registry.Node); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(registry.Node) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockEtcdRegistry_GetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNode' -type mockEtcdRegistry_GetNode_Call struct { - *mock.Call -} - -// GetNode is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) GetNode() *mockEtcdRegistry_GetNode_Call { - return &mockEtcdRegistry_GetNode_Call{Call: _e.mock.On("GetNode")} -} - -func (_c *mockEtcdRegistry_GetNode_Call) Run(run func()) *mockEtcdRegistry_GetNode_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_GetNode_Call) Return(_a0 registry.Node, _a1 error) *mockEtcdRegistry_GetNode_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockEtcdRegistry_GetNode_Call) RunAndReturn(run func() (registry.Node, error)) *mockEtcdRegistry_GetNode_Call { - _c.Call.Return(run) - return _c -} - -// GlobalConfig provides a mock function with given fields: -func (_m *mockEtcdRegistry) GlobalConfig() registry.ConfigurationContext { - ret := _m.Called() - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_GlobalConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GlobalConfig' -type mockEtcdRegistry_GlobalConfig_Call struct { - *mock.Call -} - -// GlobalConfig is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) GlobalConfig() *mockEtcdRegistry_GlobalConfig_Call { - return &mockEtcdRegistry_GlobalConfig_Call{Call: _e.mock.On("GlobalConfig")} -} - -func (_c *mockEtcdRegistry_GlobalConfig_Call) Run(run func()) *mockEtcdRegistry_GlobalConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_GlobalConfig_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_GlobalConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_GlobalConfig_Call) RunAndReturn(run func() registry.ConfigurationContext) *mockEtcdRegistry_GlobalConfig_Call { - _c.Call.Return(run) - return _c -} - -// HostConfig provides a mock function with given fields: hostService -func (_m *mockEtcdRegistry) HostConfig(hostService string) registry.ConfigurationContext { - ret := _m.Called(hostService) - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { - r0 = rf(hostService) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_HostConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HostConfig' -type mockEtcdRegistry_HostConfig_Call struct { - *mock.Call -} - -// HostConfig is a helper method to define mock.On call -// - hostService string -func (_e *mockEtcdRegistry_Expecter) HostConfig(hostService interface{}) *mockEtcdRegistry_HostConfig_Call { - return &mockEtcdRegistry_HostConfig_Call{Call: _e.mock.On("HostConfig", hostService)} -} - -func (_c *mockEtcdRegistry_HostConfig_Call) Run(run func(hostService string)) *mockEtcdRegistry_HostConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdRegistry_HostConfig_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_HostConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_HostConfig_Call) RunAndReturn(run func(string) registry.ConfigurationContext) *mockEtcdRegistry_HostConfig_Call { - _c.Call.Return(run) - return _c -} - -// RootConfig provides a mock function with given fields: -func (_m *mockEtcdRegistry) RootConfig() registry.WatchConfigurationContext { - ret := _m.Called() - - var r0 registry.WatchConfigurationContext - if rf, ok := ret.Get(0).(func() registry.WatchConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.WatchConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_RootConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RootConfig' -type mockEtcdRegistry_RootConfig_Call struct { - *mock.Call -} - -// RootConfig is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) RootConfig() *mockEtcdRegistry_RootConfig_Call { - return &mockEtcdRegistry_RootConfig_Call{Call: _e.mock.On("RootConfig")} -} - -func (_c *mockEtcdRegistry_RootConfig_Call) Run(run func()) *mockEtcdRegistry_RootConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_RootConfig_Call) Return(_a0 registry.WatchConfigurationContext) *mockEtcdRegistry_RootConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_RootConfig_Call) RunAndReturn(run func() registry.WatchConfigurationContext) *mockEtcdRegistry_RootConfig_Call { - _c.Call.Return(run) - return _c -} - -// State provides a mock function with given fields: dogu -func (_m *mockEtcdRegistry) State(dogu string) registry.State { - ret := _m.Called(dogu) - - var r0 registry.State - if rf, ok := ret.Get(0).(func(string) registry.State); ok { - r0 = rf(dogu) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.State) - } - } - - return r0 -} - -// mockEtcdRegistry_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' -type mockEtcdRegistry_State_Call struct { - *mock.Call -} - -// State is a helper method to define mock.On call -// - dogu string -func (_e *mockEtcdRegistry_Expecter) State(dogu interface{}) *mockEtcdRegistry_State_Call { - return &mockEtcdRegistry_State_Call{Call: _e.mock.On("State", dogu)} -} - -func (_c *mockEtcdRegistry_State_Call) Run(run func(dogu string)) *mockEtcdRegistry_State_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdRegistry_State_Call) Return(_a0 registry.State) *mockEtcdRegistry_State_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_State_Call) RunAndReturn(run func(string) registry.State) *mockEtcdRegistry_State_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTnewMockEtcdRegistry interface { - mock.TestingT - Cleanup(func()) -} - -// newMockEtcdRegistry creates a new instance of mockEtcdRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockEtcdRegistry(t mockConstructorTestingTnewMockEtcdRegistry) *mockEtcdRegistry { - mock := &mockEtcdRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/backup/interfaces.go b/pkg/backup/interfaces.go index 75d2222..d44c532 100644 --- a/pkg/backup/interfaces.go +++ b/pkg/backup/interfaces.go @@ -2,7 +2,6 @@ package backup import ( "context" - "github.com/cloudogu/cesapp-lib/registry" "github.com/cloudogu/k8s-backup-operator/pkg/api/ecosystem" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" "github.com/cloudogu/k8s-backup-operator/pkg/provider" @@ -54,18 +53,8 @@ type requeueHandler interface { Handle(ctx context.Context, contextMessage string, backup v1.RequeuableObject, originalErr error, requeueStatus string) (ctrl.Result, error) } -type etcdRegistry interface { - registry.Registry -} - // used for mocks -//nolint:unused -//goland:noinspection GoUnusedType -type configurationContext interface { - registry.ConfigurationContext -} - //nolint:unused //goland:noinspection GoUnusedType type backupV1Alpha1Interface interface { diff --git a/pkg/maintenance/looseCoupling.go b/pkg/maintenance/looseCoupling.go index a7fe8cb..196ce04 100644 --- a/pkg/maintenance/looseCoupling.go +++ b/pkg/maintenance/looseCoupling.go @@ -2,116 +2,31 @@ package maintenance import ( "context" - "fmt" - "sigs.k8s.io/controller-runtime/pkg/log" "time" - - appsv1 "k8s.io/api/apps/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) var waitForEtcdTimeout = 5 * time.Minute type looselyCoupledMaintenanceSwitch struct { maintenanceModeSwitch - statefulSetClient statefulSetInterface - serviceInterface serviceInterface } // NewWithLooseCoupling creates a switch that checks if the configuration registry (e.g., etcd) exists before switching. // If the registry does not exist, no switch is executed. -func NewWithLooseCoupling(globalConfigRepository globalConfigRepository, clientSet statefulSetInterface, serviceInterface serviceInterface) *looselyCoupledMaintenanceSwitch { +func NewWithLooseCoupling(globalConfigRepository globalConfigRepository) *looselyCoupledMaintenanceSwitch { return &looselyCoupledMaintenanceSwitch{ maintenanceModeSwitch: New(globalConfigRepository), - statefulSetClient: clientSet, - serviceInterface: serviceInterface, } } // ActivateMaintenanceMode activates the maintenance mode if the etcd exists and is ready. // This loose coupling enables us to perform restores on an empty cluster. func (lcms *looselyCoupledMaintenanceSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { - if etcdReady, err := lcms.isEtcdReady(ctx); err != nil { - return fmt.Errorf("failed to check if etcd is ready: %w", err) - } else if etcdReady { - return lcms.maintenanceModeSwitch.ActivateMaintenanceMode(ctx, title, text) - } - - return nil -} - -func (lcms *looselyCoupledMaintenanceSwitch) isEtcdReady(ctx context.Context) (bool, error) { - statefulSet, err := lcms.statefulSetClient.Get(ctx, "etcd", metav1.GetOptions{}) - if err != nil { - return checkReadyWithResourceNotFoundError(err, "etcd", "statefulset") - } - _, headLessServiceErr := lcms.serviceInterface.Get(ctx, "etcd-headless", metav1.GetOptions{}) - if headLessServiceErr != nil { - return checkReadyWithResourceNotFoundError(headLessServiceErr, "etcd-headless", "service") - } - _, serviceErr := lcms.serviceInterface.Get(ctx, "etcd", metav1.GetOptions{}) - if serviceErr != nil { - return checkReadyWithResourceNotFoundError(serviceErr, "etcd", "service") - } - - if statefulSet.Status.ReadyReplicas >= 1 { - return true, nil - } - return false, nil -} - -func checkReadyWithResourceNotFoundError(err error, resource string, resourceType string) (bool, error) { - if errors.IsNotFound(err) { - return false, nil - } - return false, fmt.Errorf("failed to get %s [%s]: %w", resourceType, resource, err) + return lcms.maintenanceModeSwitch.ActivateMaintenanceMode(ctx, title, text) } // DeactivateMaintenanceMode waits until the etcd is ready and then deactivates the maintenance mode. // While this is not directly loose coupling, we trust that an instance of etcd will be restored. func (lcms *looselyCoupledMaintenanceSwitch) DeactivateMaintenanceMode(ctx context.Context) error { - err := lcms.waitForReadyEtcd(ctx) - if err != nil { - return fmt.Errorf("failed to wait for ready etcd: %w", err) - } - return lcms.maintenanceModeSwitch.DeactivateMaintenanceMode(ctx) } - -func (lcms *looselyCoupledMaintenanceSwitch) waitForReadyEtcd(ctx context.Context) error { - waitCtx, cancelFunc := context.WithTimeout(ctx, waitForEtcdTimeout) - defer cancelFunc() - logger := log.FromContext(ctx) - - watch, err := lcms.statefulSetClient.Watch(ctx, metav1.ListOptions{FieldSelector: "metadata.name=etcd"}) - if err != nil { - return fmt.Errorf("failed to create watch for StatefulSet etcd: %w", err) - } - - defer watch.Stop() - - result := make(chan error, 1) - go func(ctx context.Context) { - for { - select { - case <-ctx.Done(): - result <- fmt.Errorf("waiting for etcd to become ready timed out") - return - case event := <-watch.ResultChan(): - statefulSet, ok := event.Object.(*appsv1.StatefulSet) - if !ok { - logger.Error(fmt.Errorf("unexpected type %T for watch on StatefulSet etcd; object: %#v", event.Object, event.Object), "wrong object type") - continue - } - - if statefulSet.Status.ReadyReplicas >= 1 { - result <- nil - return - } - } - } - }(waitCtx) - - return <-result -} diff --git a/pkg/maintenance/looseCoupling_test.go b/pkg/maintenance/looseCoupling_test.go index 28d8ead..60f8b39 100644 --- a/pkg/maintenance/looseCoupling_test.go +++ b/pkg/maintenance/looseCoupling_test.go @@ -3,170 +3,28 @@ package maintenance import ( "context" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/watch" "testing" - "time" ) var testCtx = context.TODO() func TestNewWithLooseCoupling(t *testing.T) { // when - actual := NewWithLooseCoupling(nil, nil, nil) + actual := NewWithLooseCoupling(nil) // then require.NotEmpty(t, actual) } func Test_looselyCoupledMaintenanceSwitch_ActivateMaintenanceMode(t *testing.T) { - t.Run("should not activate maintenance mode if etcd is not found", func(t *testing.T) { - // given - notFoundErr := errors.NewNotFound(schema.GroupResource{ - Group: "apps/v1", - Resource: "StatefulSet", - }, "etcd") - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, notFoundErr) - - sut := &looselyCoupledMaintenanceSwitch{statefulSetClient: statefulSetClient} - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.NoError(t, err) - }) - - t.Run("should not activate maintenance mode if etcd-headless service is not found", func(t *testing.T) { - // given - notFoundErr := errors.NewNotFound(schema.GroupResource{ - Group: "core/v1", - Resource: "Service", - }, "etcd") - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, nil) - serviceClient := newMockServiceInterface(t) - serviceClient.EXPECT().Get(testCtx, "etcd-headless", metav1.GetOptions{}).Return(nil, notFoundErr) - - sut := &looselyCoupledMaintenanceSwitch{statefulSetClient: statefulSetClient, serviceInterface: serviceClient} - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.NoError(t, err) - }) - - t.Run("should not activate maintenance mode if etcd service is not found", func(t *testing.T) { - // given - notFoundErr := errors.NewNotFound(schema.GroupResource{ - Group: "core/v1", - Resource: "Service", - }, "etcd") - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, nil) - serviceClient := newMockServiceInterface(t) - serviceClient.EXPECT().Get(testCtx, "etcd-headless", metav1.GetOptions{}).Return(nil, nil) - serviceClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, notFoundErr) - - sut := &looselyCoupledMaintenanceSwitch{statefulSetClient: statefulSetClient, serviceInterface: serviceClient} - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.NoError(t, err) - }) - - t.Run("should fail if getting etcd returns any error other than 'not found'", func(t *testing.T) { - // given - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, assert.AnError) - - sut := &looselyCoupledMaintenanceSwitch{statefulSetClient: statefulSetClient} - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.Error(t, err) - assert.ErrorIs(t, err, assert.AnError) - assert.ErrorContains(t, err, "failed to check if etcd is ready") - assert.ErrorContains(t, err, "failed to get statefulset [etcd]") - }) - t.Run("should not activate maintenance mode if etcd has no ready replicas", func(t *testing.T) { - // given - etcd := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: "etcd", Namespace: "ecosystem"}, - Status: appsv1.StatefulSetStatus{ReadyReplicas: 0}, - } - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(etcd, nil) - serviceClient := newMockServiceInterface(t) - serviceClient.EXPECT().Get(testCtx, "etcd-headless", metav1.GetOptions{}).Return(nil, nil) - serviceClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, nil) - - sut := &looselyCoupledMaintenanceSwitch{statefulSetClient: statefulSetClient, serviceInterface: serviceClient} - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.NoError(t, err) - }) - t.Run("should activate maintenance mode if etcd has a ready replica", func(t *testing.T) { - // given - maintenance := newMockMaintenanceModeSwitch(t) - maintenance.EXPECT().ActivateMaintenanceMode(testCtx, "title", "text").Return(nil) - - etcd := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: "etcd", Namespace: "ecosystem"}, - Status: appsv1.StatefulSetStatus{ReadyReplicas: 1}, - } - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(etcd, nil) - serviceClient := newMockServiceInterface(t) - serviceClient.EXPECT().Get(testCtx, "etcd-headless", metav1.GetOptions{}).Return(nil, nil) - serviceClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, nil) - - sut := &looselyCoupledMaintenanceSwitch{ - maintenanceModeSwitch: maintenance, - statefulSetClient: statefulSetClient, - serviceInterface: serviceClient, - } - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.NoError(t, err) - }) t.Run("should fail if activating the maintenance mode fails", func(t *testing.T) { // given maintenance := newMockMaintenanceModeSwitch(t) maintenance.EXPECT().ActivateMaintenanceMode(testCtx, "title", "text").Return(assert.AnError) - etcd := &appsv1.StatefulSet{ - ObjectMeta: metav1.ObjectMeta{Name: "etcd", Namespace: "ecosystem"}, - Status: appsv1.StatefulSetStatus{ReadyReplicas: 1}, - } - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(etcd, nil) - serviceClient := newMockServiceInterface(t) - serviceClient.EXPECT().Get(testCtx, "etcd-headless", metav1.GetOptions{}).Return(nil, nil) - serviceClient.EXPECT().Get(testCtx, "etcd", metav1.GetOptions{}).Return(nil, nil) - sut := &looselyCoupledMaintenanceSwitch{ maintenanceModeSwitch: maintenance, - statefulSetClient: statefulSetClient, - serviceInterface: serviceClient, } // when @@ -179,135 +37,13 @@ func Test_looselyCoupledMaintenanceSwitch_ActivateMaintenanceMode(t *testing.T) } func Test_looselyCoupledMaintenanceSwitch_DeactivateMaintenanceMode(t *testing.T) { - t.Run("should fail if watch fails", func(t *testing.T) { - // given - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Watch(mock.Anything, metav1.ListOptions{FieldSelector: "metadata.name=etcd"}).Return(nil, assert.AnError) - - sut := &looselyCoupledMaintenanceSwitch{ - statefulSetClient: statefulSetClient, - } - - // when - err := sut.DeactivateMaintenanceMode(testCtx) - - // then - require.Error(t, err) - assert.ErrorIs(t, err, assert.AnError) - assert.ErrorContains(t, err, "failed to create watch for StatefulSet etcd") - assert.ErrorContains(t, err, "failed to wait for ready etcd") - }) - t.Run("should fail if watch timeout is reached", func(t *testing.T) { - // given - oldTimeout := waitForEtcdTimeout - defer func() { waitForEtcdTimeout = oldTimeout }() - waitForEtcdTimeout = 1 * time.Millisecond - - watchChan := make(chan watch.Event) - watchMock := newMockWatcher(t) - watchMock.EXPECT().Stop().Run(func() { close(watchChan) }) - watchMock.EXPECT().ResultChan().Return(watchChan) - - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Watch(mock.Anything, metav1.ListOptions{FieldSelector: "metadata.name=etcd"}).Return(watchMock, nil) - - sut := &looselyCoupledMaintenanceSwitch{ - statefulSetClient: statefulSetClient, - } - - // when - err := sut.DeactivateMaintenanceMode(testCtx) - - // then - require.Error(t, err) - assert.ErrorContains(t, err, "waiting for etcd to become ready timed out") - assert.ErrorContains(t, err, "failed to wait for ready etcd") - }) - t.Run("should fail if watch event has unexpected object type", func(t *testing.T) { - // given - oldTimeout := waitForEtcdTimeout - defer func() { waitForEtcdTimeout = oldTimeout }() - waitForEtcdTimeout = 1 * time.Millisecond - - watchChan := make(chan watch.Event) - go func() { - // goroutine is somehow necessary for event to be recognized - watchChan <- watch.Event{Object: &corev1.ConfigMap{}} - }() - - watchMock := newMockWatcher(t) - watchMock.EXPECT().Stop().Run(func() { close(watchChan) }) - watchMock.EXPECT().ResultChan().Return(watchChan) - - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Watch(mock.Anything, metav1.ListOptions{FieldSelector: "metadata.name=etcd"}).Return(watchMock, nil) - - sut := &looselyCoupledMaintenanceSwitch{ - statefulSetClient: statefulSetClient, - } - - // when - err := sut.DeactivateMaintenanceMode(testCtx) - - // then - require.Error(t, err) - assert.ErrorContains(t, err, "waiting for etcd to become ready timed out") - assert.ErrorContains(t, err, "failed to wait for ready etcd") - }) - t.Run("should deactivate maintenance if StatefulSet has ready replicas", func(t *testing.T) { - // given - watchChan := make(chan watch.Event) - go func() { - // goroutine is somehow necessary for event to be recognized - watchChan <- watch.Event{Object: &appsv1.StatefulSet{ - Status: appsv1.StatefulSetStatus{ReadyReplicas: 1}, - }} - }() - - watchMock := newMockWatcher(t) - watchMock.EXPECT().Stop().Run(func() { close(watchChan) }) - watchMock.EXPECT().ResultChan().Return(watchChan) - - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Watch(mock.Anything, metav1.ListOptions{FieldSelector: "metadata.name=etcd"}).Return(watchMock, nil) - - maintenance := newMockMaintenanceModeSwitch(t) - maintenance.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) - - sut := &looselyCoupledMaintenanceSwitch{ - maintenanceModeSwitch: maintenance, - statefulSetClient: statefulSetClient, - } - - // when - err := sut.DeactivateMaintenanceMode(testCtx) - - // then - require.NoError(t, err) - }) t.Run("should fail if deactivating maintenance fails", func(t *testing.T) { // given - watchChan := make(chan watch.Event) - go func() { - // goroutine is somehow necessary for event to be recognized - watchChan <- watch.Event{Object: &appsv1.StatefulSet{ - Status: appsv1.StatefulSetStatus{ReadyReplicas: 1}, - }} - }() - - watchMock := newMockWatcher(t) - watchMock.EXPECT().Stop().Run(func() { close(watchChan) }) - watchMock.EXPECT().ResultChan().Return(watchChan) - - statefulSetClient := newMockStatefulSetInterface(t) - statefulSetClient.EXPECT().Watch(mock.Anything, metav1.ListOptions{FieldSelector: "metadata.name=etcd"}).Return(watchMock, nil) - maintenance := newMockMaintenanceModeSwitch(t) maintenance.EXPECT().DeactivateMaintenanceMode(testCtx).Return(assert.AnError) sut := &looselyCoupledMaintenanceSwitch{ maintenanceModeSwitch: maintenance, - statefulSetClient: statefulSetClient, } // when diff --git a/pkg/restore/createManager.go b/pkg/restore/createManager.go index cad81a1..461de21 100644 --- a/pkg/restore/createManager.go +++ b/pkg/restore/createManager.go @@ -32,7 +32,7 @@ func newCreateManager( globalConfigRepository globalConfigRepository, cleanup cleanupManager, ) *defaultCreateManager { - maintenanceSwitch := maintenance.NewWithLooseCoupling(globalConfigRepository, ecosystemClientSet.AppsV1().StatefulSets(namespace), ecosystemClientSet.CoreV1().Services(namespace)) + maintenanceSwitch := maintenance.NewWithLooseCoupling(globalConfigRepository) return &defaultCreateManager{ ecosystemClientSet: ecosystemClientSet, namespace: namespace, diff --git a/pkg/restore/createManager_test.go b/pkg/restore/createManager_test.go index a43ee9c..7f46e08 100644 --- a/pkg/restore/createManager_test.go +++ b/pkg/restore/createManager_test.go @@ -14,16 +14,7 @@ func Test_newCreateManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given globalConfigRepositoryMock := newMockGlobalConfigRepository(t) - - statefulSetMock := newMockStatefulSetInterface(t) - serviceMock := newMockServiceInterface(t) - appsV1Mock := newMockAppsV1Interface(t) - appsV1Mock.EXPECT().StatefulSets(testNamespace).Return(statefulSetMock) - coreV1Mock := newMockCoreV1Interface(t) - coreV1Mock.EXPECT().Services(testNamespace).Return(serviceMock) clientSetMock := newMockEcosystemInterface(t) - clientSetMock.EXPECT().AppsV1().Return(appsV1Mock) - clientSetMock.EXPECT().CoreV1().Return(coreV1Mock) // when manager := newCreateManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock, nil) diff --git a/pkg/restore/manager_test.go b/pkg/restore/manager_test.go index 2b81ae2..c9547ae 100644 --- a/pkg/restore/manager_test.go +++ b/pkg/restore/manager_test.go @@ -10,16 +10,7 @@ func TestNewRestoreManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given globalConfigRepositoryMock := newMockGlobalConfigRepository(t) - - statefulSetMock := newMockStatefulSetInterface(t) - serviceMock := newMockServiceInterface(t) - appsV1Mock := newMockAppsV1Interface(t) - appsV1Mock.EXPECT().StatefulSets(testNamespace).Return(statefulSetMock) - coreV1Mock := newMockCoreV1Interface(t) - coreV1Mock.EXPECT().Services(testNamespace).Return(serviceMock) clientSetMock := newMockEcosystemInterface(t) - clientSetMock.EXPECT().AppsV1().Return(appsV1Mock) - clientSetMock.EXPECT().CoreV1().Return(coreV1Mock) // when manager := NewRestoreManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock, nil) From c0963516ad7125129dfbe9000888c48c0a6d7c12 Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 15:38:45 +0200 Subject: [PATCH 06/19] #31 update go version in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 140dcf1..3123933 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ ARTIFACT_ID=k8s-backup-operator VERSION=0.11.0 IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION} -GOTAG?=1.22 +GOTAG?=1.23 MAKEFILES_VERSION=9.2.1 STAGE?=production From 5de75bdf150920598b41bcbe0a502208254045be Mon Sep 17 00:00:00 2001 From: Niklas Roeske Date: Fri, 4 Oct 2024 15:53:22 +0200 Subject: [PATCH 07/19] #31 update go version in Dockerfile and Jenkinsfile --- Dockerfile | 2 +- Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c4d2fc..f410a3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 AS builder +FROM golang:1.23 AS builder WORKDIR /workspace diff --git a/Jenkinsfile b/Jenkinsfile index 97e7440..8eaa34a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ github = new GitHub(this, git) changelog = new Changelog(this) Docker docker = new Docker(this) gpg = new Gpg(this, docker) -goVersion = "1.22" +goVersion = "1.23" Makefile makefile = new Makefile(this) // Configuration of repository From 319b53dca9c77c4de7379d06110d69885a691dc1 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 8 Oct 2024 16:27:19 +0200 Subject: [PATCH 08/19] #31 Fix unit tests --- main_internal_test.go | 8 +- mock_controllerManager_test.go | 828 +++++++++++++++++++++++++++++++++ 2 files changed, 833 insertions(+), 3 deletions(-) create mode 100644 mock_controllerManager_test.go diff --git a/main_internal_test.go b/main_internal_test.go index 95179b4..d56096f 100644 --- a/main_internal_test.go +++ b/main_internal_test.go @@ -434,6 +434,7 @@ func Test_startOperator(t *testing.T) { assert.ErrorIs(t, err, assert.AnError) assert.ErrorContains(t, err, "unable to configure manager: unable to add checks to the manager: unable to set up health check") }) + var skipNameValidation = true t.Run("should fail to add readiness check to controller manager", func(t *testing.T) { // given t.Setenv("NAMESPACE", "ecosystem") @@ -464,7 +465,7 @@ func Test_startOperator(t *testing.T) { ctrlManMock.EXPECT().GetEventRecorderFor("k8s-backup-operator").Return(recorderMock) ctrlManMock.EXPECT().GetConfig().Return(restConfig) ctrlManMock.EXPECT().GetClient().Return(k8sClientMock) - ctrlManMock.EXPECT().GetControllerOptions().Return(config.Controller{}) + ctrlManMock.EXPECT().GetControllerOptions().Return(config.Controller{SkipNameValidation: &skipNameValidation}) ctrlManMock.EXPECT().GetScheme().Return(createScheme(t)) ctrlManMock.EXPECT().GetLogger().Return(logr.New(logMock)) ctrlManMock.EXPECT().Add(mock.Anything).Return(nil) @@ -507,6 +508,7 @@ func Test_startOperator(t *testing.T) { assert.ErrorIs(t, err, assert.AnError) assert.ErrorContains(t, err, "unable to configure manager: unable to add checks to the manager: unable to set up ready check") }) + t.Run("should fail to start controller manager", func(t *testing.T) { // given t.Setenv("NAMESPACE", "ecosystem") @@ -539,7 +541,7 @@ func Test_startOperator(t *testing.T) { ctrlManMock.EXPECT().GetEventRecorderFor("k8s-backup-operator").Return(recorderMock) ctrlManMock.EXPECT().GetConfig().Return(restConfig) ctrlManMock.EXPECT().GetClient().Return(k8sClientMock) - ctrlManMock.EXPECT().GetControllerOptions().Return(config.Controller{}) + ctrlManMock.EXPECT().GetControllerOptions().Return(config.Controller{SkipNameValidation: &skipNameValidation}) ctrlManMock.EXPECT().GetScheme().Return(createScheme(t)) ctrlManMock.EXPECT().GetLogger().Return(logr.New(logMock)) ctrlManMock.EXPECT().Add(mock.Anything).Return(nil) @@ -618,7 +620,7 @@ func Test_startOperator(t *testing.T) { ctrlManMock.EXPECT().GetEventRecorderFor("k8s-backup-operator").Return(recorderMock) ctrlManMock.EXPECT().GetConfig().Return(restConfig) ctrlManMock.EXPECT().GetClient().Return(k8sClientMock) - ctrlManMock.EXPECT().GetControllerOptions().Return(config.Controller{}) + ctrlManMock.EXPECT().GetControllerOptions().Return(config.Controller{SkipNameValidation: &skipNameValidation}) ctrlManMock.EXPECT().GetScheme().Return(createScheme(t)) ctrlManMock.EXPECT().GetLogger().Return(logr.New(logMock)) ctrlManMock.EXPECT().Add(mock.Anything).Return(nil) diff --git a/mock_controllerManager_test.go b/mock_controllerManager_test.go new file mode 100644 index 0000000..59adef9 --- /dev/null +++ b/mock_controllerManager_test.go @@ -0,0 +1,828 @@ +// Code generated by mockery v2.30.1. DO NOT EDIT. + +package main + +import ( + cache "sigs.k8s.io/controller-runtime/pkg/cache" + client "sigs.k8s.io/controller-runtime/pkg/client" + + config "sigs.k8s.io/controller-runtime/pkg/config" + + context "context" + + healthz "sigs.k8s.io/controller-runtime/pkg/healthz" + + http "net/http" + + logr "github.com/go-logr/logr" + + manager "sigs.k8s.io/controller-runtime/pkg/manager" + + meta "k8s.io/apimachinery/pkg/api/meta" + + mock "github.com/stretchr/testify/mock" + + record "k8s.io/client-go/tools/record" + + rest "k8s.io/client-go/rest" + + runtime "k8s.io/apimachinery/pkg/runtime" + + webhook "sigs.k8s.io/controller-runtime/pkg/webhook" +) + +// mockControllerManager is an autogenerated mock type for the controllerManager type +type mockControllerManager struct { + mock.Mock +} + +type mockControllerManager_Expecter struct { + mock *mock.Mock +} + +func (_m *mockControllerManager) EXPECT() *mockControllerManager_Expecter { + return &mockControllerManager_Expecter{mock: &_m.Mock} +} + +// Add provides a mock function with given fields: _a0 +func (_m *mockControllerManager) Add(_a0 manager.Runnable) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(manager.Runnable) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type mockControllerManager_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - _a0 manager.Runnable +func (_e *mockControllerManager_Expecter) Add(_a0 interface{}) *mockControllerManager_Add_Call { + return &mockControllerManager_Add_Call{Call: _e.mock.On("Add", _a0)} +} + +func (_c *mockControllerManager_Add_Call) Run(run func(_a0 manager.Runnable)) *mockControllerManager_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(manager.Runnable)) + }) + return _c +} + +func (_c *mockControllerManager_Add_Call) Return(_a0 error) *mockControllerManager_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_Add_Call) RunAndReturn(run func(manager.Runnable) error) *mockControllerManager_Add_Call { + _c.Call.Return(run) + return _c +} + +// AddHealthzCheck provides a mock function with given fields: name, check +func (_m *mockControllerManager) AddHealthzCheck(name string, check healthz.Checker) error { + ret := _m.Called(name, check) + + var r0 error + if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { + r0 = rf(name, check) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_AddHealthzCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddHealthzCheck' +type mockControllerManager_AddHealthzCheck_Call struct { + *mock.Call +} + +// AddHealthzCheck is a helper method to define mock.On call +// - name string +// - check healthz.Checker +func (_e *mockControllerManager_Expecter) AddHealthzCheck(name interface{}, check interface{}) *mockControllerManager_AddHealthzCheck_Call { + return &mockControllerManager_AddHealthzCheck_Call{Call: _e.mock.On("AddHealthzCheck", name, check)} +} + +func (_c *mockControllerManager_AddHealthzCheck_Call) Run(run func(name string, check healthz.Checker)) *mockControllerManager_AddHealthzCheck_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(healthz.Checker)) + }) + return _c +} + +func (_c *mockControllerManager_AddHealthzCheck_Call) Return(_a0 error) *mockControllerManager_AddHealthzCheck_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_AddHealthzCheck_Call) RunAndReturn(run func(string, healthz.Checker) error) *mockControllerManager_AddHealthzCheck_Call { + _c.Call.Return(run) + return _c +} + +// AddMetricsServerExtraHandler provides a mock function with given fields: path, handler +func (_m *mockControllerManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error { + ret := _m.Called(path, handler) + + var r0 error + if rf, ok := ret.Get(0).(func(string, http.Handler) error); ok { + r0 = rf(path, handler) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_AddMetricsServerExtraHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMetricsServerExtraHandler' +type mockControllerManager_AddMetricsServerExtraHandler_Call struct { + *mock.Call +} + +// AddMetricsServerExtraHandler is a helper method to define mock.On call +// - path string +// - handler http.Handler +func (_e *mockControllerManager_Expecter) AddMetricsServerExtraHandler(path interface{}, handler interface{}) *mockControllerManager_AddMetricsServerExtraHandler_Call { + return &mockControllerManager_AddMetricsServerExtraHandler_Call{Call: _e.mock.On("AddMetricsServerExtraHandler", path, handler)} +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Run(run func(path string, handler http.Handler)) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(http.Handler)) + }) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) Return(_a0 error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_AddMetricsServerExtraHandler_Call) RunAndReturn(run func(string, http.Handler) error) *mockControllerManager_AddMetricsServerExtraHandler_Call { + _c.Call.Return(run) + return _c +} + +// AddReadyzCheck provides a mock function with given fields: name, check +func (_m *mockControllerManager) AddReadyzCheck(name string, check healthz.Checker) error { + ret := _m.Called(name, check) + + var r0 error + if rf, ok := ret.Get(0).(func(string, healthz.Checker) error); ok { + r0 = rf(name, check) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_AddReadyzCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddReadyzCheck' +type mockControllerManager_AddReadyzCheck_Call struct { + *mock.Call +} + +// AddReadyzCheck is a helper method to define mock.On call +// - name string +// - check healthz.Checker +func (_e *mockControllerManager_Expecter) AddReadyzCheck(name interface{}, check interface{}) *mockControllerManager_AddReadyzCheck_Call { + return &mockControllerManager_AddReadyzCheck_Call{Call: _e.mock.On("AddReadyzCheck", name, check)} +} + +func (_c *mockControllerManager_AddReadyzCheck_Call) Run(run func(name string, check healthz.Checker)) *mockControllerManager_AddReadyzCheck_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(healthz.Checker)) + }) + return _c +} + +func (_c *mockControllerManager_AddReadyzCheck_Call) Return(_a0 error) *mockControllerManager_AddReadyzCheck_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_AddReadyzCheck_Call) RunAndReturn(run func(string, healthz.Checker) error) *mockControllerManager_AddReadyzCheck_Call { + _c.Call.Return(run) + return _c +} + +// Elected provides a mock function with given fields: +func (_m *mockControllerManager) Elected() <-chan struct{} { + ret := _m.Called() + + var r0 <-chan struct{} + if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan struct{}) + } + } + + return r0 +} + +// mockControllerManager_Elected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Elected' +type mockControllerManager_Elected_Call struct { + *mock.Call +} + +// Elected is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) Elected() *mockControllerManager_Elected_Call { + return &mockControllerManager_Elected_Call{Call: _e.mock.On("Elected")} +} + +func (_c *mockControllerManager_Elected_Call) Run(run func()) *mockControllerManager_Elected_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_Elected_Call) Return(_a0 <-chan struct{}) *mockControllerManager_Elected_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_Elected_Call) RunAndReturn(run func() <-chan struct{}) *mockControllerManager_Elected_Call { + _c.Call.Return(run) + return _c +} + +// GetAPIReader provides a mock function with given fields: +func (_m *mockControllerManager) GetAPIReader() client.Reader { + ret := _m.Called() + + var r0 client.Reader + if rf, ok := ret.Get(0).(func() client.Reader); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.Reader) + } + } + + return r0 +} + +// mockControllerManager_GetAPIReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAPIReader' +type mockControllerManager_GetAPIReader_Call struct { + *mock.Call +} + +// GetAPIReader is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetAPIReader() *mockControllerManager_GetAPIReader_Call { + return &mockControllerManager_GetAPIReader_Call{Call: _e.mock.On("GetAPIReader")} +} + +func (_c *mockControllerManager_GetAPIReader_Call) Run(run func()) *mockControllerManager_GetAPIReader_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetAPIReader_Call) Return(_a0 client.Reader) *mockControllerManager_GetAPIReader_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetAPIReader_Call) RunAndReturn(run func() client.Reader) *mockControllerManager_GetAPIReader_Call { + _c.Call.Return(run) + return _c +} + +// GetCache provides a mock function with given fields: +func (_m *mockControllerManager) GetCache() cache.Cache { + ret := _m.Called() + + var r0 cache.Cache + if rf, ok := ret.Get(0).(func() cache.Cache); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cache.Cache) + } + } + + return r0 +} + +// mockControllerManager_GetCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCache' +type mockControllerManager_GetCache_Call struct { + *mock.Call +} + +// GetCache is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetCache() *mockControllerManager_GetCache_Call { + return &mockControllerManager_GetCache_Call{Call: _e.mock.On("GetCache")} +} + +func (_c *mockControllerManager_GetCache_Call) Run(run func()) *mockControllerManager_GetCache_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetCache_Call) Return(_a0 cache.Cache) *mockControllerManager_GetCache_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetCache_Call) RunAndReturn(run func() cache.Cache) *mockControllerManager_GetCache_Call { + _c.Call.Return(run) + return _c +} + +// GetClient provides a mock function with given fields: +func (_m *mockControllerManager) GetClient() client.Client { + ret := _m.Called() + + var r0 client.Client + if rf, ok := ret.Get(0).(func() client.Client); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.Client) + } + } + + return r0 +} + +// mockControllerManager_GetClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClient' +type mockControllerManager_GetClient_Call struct { + *mock.Call +} + +// GetClient is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetClient() *mockControllerManager_GetClient_Call { + return &mockControllerManager_GetClient_Call{Call: _e.mock.On("GetClient")} +} + +func (_c *mockControllerManager_GetClient_Call) Run(run func()) *mockControllerManager_GetClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetClient_Call) Return(_a0 client.Client) *mockControllerManager_GetClient_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetClient_Call) RunAndReturn(run func() client.Client) *mockControllerManager_GetClient_Call { + _c.Call.Return(run) + return _c +} + +// GetConfig provides a mock function with given fields: +func (_m *mockControllerManager) GetConfig() *rest.Config { + ret := _m.Called() + + var r0 *rest.Config + if rf, ok := ret.Get(0).(func() *rest.Config); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*rest.Config) + } + } + + return r0 +} + +// mockControllerManager_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' +type mockControllerManager_GetConfig_Call struct { + *mock.Call +} + +// GetConfig is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetConfig() *mockControllerManager_GetConfig_Call { + return &mockControllerManager_GetConfig_Call{Call: _e.mock.On("GetConfig")} +} + +func (_c *mockControllerManager_GetConfig_Call) Run(run func()) *mockControllerManager_GetConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetConfig_Call) Return(_a0 *rest.Config) *mockControllerManager_GetConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetConfig_Call) RunAndReturn(run func() *rest.Config) *mockControllerManager_GetConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetControllerOptions provides a mock function with given fields: +func (_m *mockControllerManager) GetControllerOptions() config.Controller { + ret := _m.Called() + + var r0 config.Controller + if rf, ok := ret.Get(0).(func() config.Controller); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(config.Controller) + } + + return r0 +} + +// mockControllerManager_GetControllerOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetControllerOptions' +type mockControllerManager_GetControllerOptions_Call struct { + *mock.Call +} + +// GetControllerOptions is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetControllerOptions() *mockControllerManager_GetControllerOptions_Call { + return &mockControllerManager_GetControllerOptions_Call{Call: _e.mock.On("GetControllerOptions")} +} + +func (_c *mockControllerManager_GetControllerOptions_Call) Run(run func()) *mockControllerManager_GetControllerOptions_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetControllerOptions_Call) Return(_a0 config.Controller) *mockControllerManager_GetControllerOptions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetControllerOptions_Call) RunAndReturn(run func() config.Controller) *mockControllerManager_GetControllerOptions_Call { + _c.Call.Return(run) + return _c +} + +// GetEventRecorderFor provides a mock function with given fields: name +func (_m *mockControllerManager) GetEventRecorderFor(name string) record.EventRecorder { + ret := _m.Called(name) + + var r0 record.EventRecorder + if rf, ok := ret.Get(0).(func(string) record.EventRecorder); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(record.EventRecorder) + } + } + + return r0 +} + +// mockControllerManager_GetEventRecorderFor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventRecorderFor' +type mockControllerManager_GetEventRecorderFor_Call struct { + *mock.Call +} + +// GetEventRecorderFor is a helper method to define mock.On call +// - name string +func (_e *mockControllerManager_Expecter) GetEventRecorderFor(name interface{}) *mockControllerManager_GetEventRecorderFor_Call { + return &mockControllerManager_GetEventRecorderFor_Call{Call: _e.mock.On("GetEventRecorderFor", name)} +} + +func (_c *mockControllerManager_GetEventRecorderFor_Call) Run(run func(name string)) *mockControllerManager_GetEventRecorderFor_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockControllerManager_GetEventRecorderFor_Call) Return(_a0 record.EventRecorder) *mockControllerManager_GetEventRecorderFor_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetEventRecorderFor_Call) RunAndReturn(run func(string) record.EventRecorder) *mockControllerManager_GetEventRecorderFor_Call { + _c.Call.Return(run) + return _c +} + +// GetFieldIndexer provides a mock function with given fields: +func (_m *mockControllerManager) GetFieldIndexer() client.FieldIndexer { + ret := _m.Called() + + var r0 client.FieldIndexer + if rf, ok := ret.Get(0).(func() client.FieldIndexer); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.FieldIndexer) + } + } + + return r0 +} + +// mockControllerManager_GetFieldIndexer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFieldIndexer' +type mockControllerManager_GetFieldIndexer_Call struct { + *mock.Call +} + +// GetFieldIndexer is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetFieldIndexer() *mockControllerManager_GetFieldIndexer_Call { + return &mockControllerManager_GetFieldIndexer_Call{Call: _e.mock.On("GetFieldIndexer")} +} + +func (_c *mockControllerManager_GetFieldIndexer_Call) Run(run func()) *mockControllerManager_GetFieldIndexer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetFieldIndexer_Call) Return(_a0 client.FieldIndexer) *mockControllerManager_GetFieldIndexer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetFieldIndexer_Call) RunAndReturn(run func() client.FieldIndexer) *mockControllerManager_GetFieldIndexer_Call { + _c.Call.Return(run) + return _c +} + +// GetHTTPClient provides a mock function with given fields: +func (_m *mockControllerManager) GetHTTPClient() *http.Client { + ret := _m.Called() + + var r0 *http.Client + if rf, ok := ret.Get(0).(func() *http.Client); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*http.Client) + } + } + + return r0 +} + +// mockControllerManager_GetHTTPClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHTTPClient' +type mockControllerManager_GetHTTPClient_Call struct { + *mock.Call +} + +// GetHTTPClient is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetHTTPClient() *mockControllerManager_GetHTTPClient_Call { + return &mockControllerManager_GetHTTPClient_Call{Call: _e.mock.On("GetHTTPClient")} +} + +func (_c *mockControllerManager_GetHTTPClient_Call) Run(run func()) *mockControllerManager_GetHTTPClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetHTTPClient_Call) Return(_a0 *http.Client) *mockControllerManager_GetHTTPClient_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetHTTPClient_Call) RunAndReturn(run func() *http.Client) *mockControllerManager_GetHTTPClient_Call { + _c.Call.Return(run) + return _c +} + +// GetLogger provides a mock function with given fields: +func (_m *mockControllerManager) GetLogger() logr.Logger { + ret := _m.Called() + + var r0 logr.Logger + if rf, ok := ret.Get(0).(func() logr.Logger); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(logr.Logger) + } + + return r0 +} + +// mockControllerManager_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger' +type mockControllerManager_GetLogger_Call struct { + *mock.Call +} + +// GetLogger is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetLogger() *mockControllerManager_GetLogger_Call { + return &mockControllerManager_GetLogger_Call{Call: _e.mock.On("GetLogger")} +} + +func (_c *mockControllerManager_GetLogger_Call) Run(run func()) *mockControllerManager_GetLogger_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetLogger_Call) Return(_a0 logr.Logger) *mockControllerManager_GetLogger_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetLogger_Call) RunAndReturn(run func() logr.Logger) *mockControllerManager_GetLogger_Call { + _c.Call.Return(run) + return _c +} + +// GetRESTMapper provides a mock function with given fields: +func (_m *mockControllerManager) GetRESTMapper() meta.RESTMapper { + ret := _m.Called() + + var r0 meta.RESTMapper + if rf, ok := ret.Get(0).(func() meta.RESTMapper); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(meta.RESTMapper) + } + } + + return r0 +} + +// mockControllerManager_GetRESTMapper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRESTMapper' +type mockControllerManager_GetRESTMapper_Call struct { + *mock.Call +} + +// GetRESTMapper is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetRESTMapper() *mockControllerManager_GetRESTMapper_Call { + return &mockControllerManager_GetRESTMapper_Call{Call: _e.mock.On("GetRESTMapper")} +} + +func (_c *mockControllerManager_GetRESTMapper_Call) Run(run func()) *mockControllerManager_GetRESTMapper_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetRESTMapper_Call) Return(_a0 meta.RESTMapper) *mockControllerManager_GetRESTMapper_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetRESTMapper_Call) RunAndReturn(run func() meta.RESTMapper) *mockControllerManager_GetRESTMapper_Call { + _c.Call.Return(run) + return _c +} + +// GetScheme provides a mock function with given fields: +func (_m *mockControllerManager) GetScheme() *runtime.Scheme { + ret := _m.Called() + + var r0 *runtime.Scheme + if rf, ok := ret.Get(0).(func() *runtime.Scheme); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*runtime.Scheme) + } + } + + return r0 +} + +// mockControllerManager_GetScheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetScheme' +type mockControllerManager_GetScheme_Call struct { + *mock.Call +} + +// GetScheme is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetScheme() *mockControllerManager_GetScheme_Call { + return &mockControllerManager_GetScheme_Call{Call: _e.mock.On("GetScheme")} +} + +func (_c *mockControllerManager_GetScheme_Call) Run(run func()) *mockControllerManager_GetScheme_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetScheme_Call) Return(_a0 *runtime.Scheme) *mockControllerManager_GetScheme_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetScheme_Call) RunAndReturn(run func() *runtime.Scheme) *mockControllerManager_GetScheme_Call { + _c.Call.Return(run) + return _c +} + +// GetWebhookServer provides a mock function with given fields: +func (_m *mockControllerManager) GetWebhookServer() webhook.Server { + ret := _m.Called() + + var r0 webhook.Server + if rf, ok := ret.Get(0).(func() webhook.Server); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(webhook.Server) + } + } + + return r0 +} + +// mockControllerManager_GetWebhookServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWebhookServer' +type mockControllerManager_GetWebhookServer_Call struct { + *mock.Call +} + +// GetWebhookServer is a helper method to define mock.On call +func (_e *mockControllerManager_Expecter) GetWebhookServer() *mockControllerManager_GetWebhookServer_Call { + return &mockControllerManager_GetWebhookServer_Call{Call: _e.mock.On("GetWebhookServer")} +} + +func (_c *mockControllerManager_GetWebhookServer_Call) Run(run func()) *mockControllerManager_GetWebhookServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockControllerManager_GetWebhookServer_Call) Return(_a0 webhook.Server) *mockControllerManager_GetWebhookServer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_GetWebhookServer_Call) RunAndReturn(run func() webhook.Server) *mockControllerManager_GetWebhookServer_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with given fields: ctx +func (_m *mockControllerManager) Start(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockControllerManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type mockControllerManager_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockControllerManager_Expecter) Start(ctx interface{}) *mockControllerManager_Start_Call { + return &mockControllerManager_Start_Call{Call: _e.mock.On("Start", ctx)} +} + +func (_c *mockControllerManager_Start_Call) Run(run func(ctx context.Context)) *mockControllerManager_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockControllerManager_Start_Call) Return(_a0 error) *mockControllerManager_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockControllerManager_Start_Call) RunAndReturn(run func(context.Context) error) *mockControllerManager_Start_Call { + _c.Call.Return(run) + return _c +} + +// newMockControllerManager creates a new instance of mockControllerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockControllerManager(t interface { + mock.TestingT + Cleanup(func()) +}) *mockControllerManager { + mock := &mockControllerManager{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From 4c1c8d870603d344e9b1f51648eac73637c1b809 Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 9 Oct 2024 07:27:53 +0200 Subject: [PATCH 09/19] #31 Delete integration testsuite because there are no integration tests. --- Jenkinsfile | 4 -- suite_int_test.go | 157 ---------------------------------------------- 2 files changed, 161 deletions(-) delete mode 100644 suite_int_test.go diff --git a/Jenkinsfile b/Jenkinsfile index 8eaa34a..627aacd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,10 +55,6 @@ node('docker') { junit allowEmptyResults: true, testResults: 'target/unit-tests/*-tests.xml' } - stage('k8s-Integration-Test') { - make 'k8s-integration-test' - } - stage("Review dog analysis") { stageStaticAnalysisReviewDog() } diff --git a/suite_int_test.go b/suite_int_test.go deleted file mode 100644 index e16d836..0000000 --- a/suite_int_test.go +++ /dev/null @@ -1,157 +0,0 @@ -//go:build k8s_integration -// +build k8s_integration - -package main - -import ( - "context" - "github.com/cloudogu/k8s-backup-operator/pkg/cleanup" - "github.com/cloudogu/k8s-backup-operator/pkg/requeue" - "os" - "path/filepath" - "testing" - "time" - - "k8s.io/client-go/kubernetes" - k8sScheme "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - "github.com/onsi/ginkgo" - "github.com/onsi/gomega" - - "github.com/cloudogu/k8s-backup-operator/pkg/api/ecosystem" - k8sv1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" - "github.com/cloudogu/k8s-backup-operator/pkg/backup" - "github.com/cloudogu/k8s-backup-operator/pkg/config" - "github.com/cloudogu/k8s-backup-operator/pkg/restore" - // +kubebuilder:scaffold:imports -) - -// These tests use Ginkgo (BDD-style Go testing framework). Refer to -// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. -var testEnv *envtest.Environment -var cfg *rest.Config -var cancel context.CancelFunc - -// Used in other integration tests -var ( - ecosystemClientSet ecosystem.Interface - recorderMock *mockEventRecorder - namespace = "default" -) - -const TimeoutInterval = time.Second * 10 -const PollingInterval = time.Second * 1 - -var oldGetConfig func() (*rest.Config, error) -var oldGetConfigOrDie func() *rest.Config - -func TestControllers(t *testing.T) { - gomega.RegisterFailHandler(ginkgo.Fail) - - ginkgo.RunSpecs(t, "Controller Suite") -} - -var _ = ginkgo.BeforeSuite(func() { - // We need to ensure that the development stage flag is not passed by our makefiles to prevent the component operator - // from running in the developing mode. The developing mode changes some operator behaviour. Our integration test - // aim to test the production functionality of the operator. - err := os.Unsetenv(config.StageEnvVar) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = os.Setenv(config.StageEnvVar, config.StageProduction) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - config.Stage = config.StageProduction - - logf.SetLogger(zap.New(zap.WriteTo(ginkgo.GinkgoWriter), zap.UseDevMode(true))) - - var ctx context.Context - ctx, cancel = context.WithCancel(context.TODO()) - - ginkgo.By("bootstrapping test environment") - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("k8s", "helm-crd", "templates")}, - ErrorIfCRDPathMissing: true, - } - - // cfg is defined in this file globally. - cfg, err = testEnv.Start() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(cfg).NotTo(gomega.BeNil()) - - oldGetConfig = ctrl.GetConfig - ctrl.GetConfig = func() (*rest.Config, error) { - return cfg, nil - } - - oldGetConfigOrDie = ctrl.GetConfigOrDie - ctrl.GetConfigOrDie = func() *rest.Config { - return cfg - } - - err = k8sv1.AddToScheme(k8sScheme.Scheme) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - // +kubebuilder:scaffold:scheme - k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: k8sScheme.Scheme, - }) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - gomega.Expect(k8sManager).NotTo(gomega.BeNil()) - t := &testing.T{} - recorderMock = newMockEventRecorder(t) - - clientSet, err := kubernetes.NewForConfig(cfg) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - - ecosystemClientSet, err = ecosystem.NewClientSet(k8sManager.GetConfig(), clientSet) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - - mockRegistry := newMockEtcdRegistry(t) - globalConfigMock := newMockEtcdContext(t) - mockRegistry.EXPECT().GlobalConfig().Return(globalConfigMock) - - backupManager := backup.NewBackupManager(ecosystemClientSet, namespace, recorderMock, mockRegistry) - gomega.Expect(backupManager).NotTo(gomega.BeNil()) - requeueHandler := requeue.NewRequeueHandler(ecosystemClientSet, recorderMock, namespace) - gomega.Expect(requeueHandler).NotTo(gomega.BeNil()) - - backupReconciler := backup.NewBackupReconciler(ecosystemClientSet, recorderMock, namespace, backupManager, requeueHandler) - gomega.Expect(backupReconciler).NotTo(gomega.BeNil()) - - err = backupReconciler.SetupWithManager(k8sManager) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - - cleanupMock := cleanup.NewManager(namespace, k8sManager.GetClient(), clientSet) - restoreManager := restore.NewRestoreManager( - ecosystemClientSet, - namespace, - recorderMock, - mockRegistry, - cleanupMock, - ) - gomega.Expect(restoreManager).NotTo(gomega.BeNil()) - restoreReconciler := restore.NewRestoreReconciler(ecosystemClientSet, recorderMock, namespace, restoreManager, requeueHandler) - gomega.Expect(restoreReconciler).NotTo(gomega.BeNil()) - - err = restoreReconciler.SetupWithManager(k8sManager) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - - go func() { - err = k8sManager.Start(ctx) - gomega.Expect(err).ToNot(gomega.HaveOccurred()) - }() -}, 60) - -var _ = ginkgo.AfterSuite(func() { - cancel() - ginkgo.By("tearing down the test environment") - err := testEnv.Stop() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - ctrl.GetConfig = oldGetConfig - ctrl.GetConfigOrDie = oldGetConfigOrDie -}) From 135ca281ab28f914f4f97f49d0d6140c11f58516 Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 9 Oct 2024 07:40:05 +0200 Subject: [PATCH 10/19] #31 delete remaining etcd occurrences --- Jenkinsfile | 12 - pkg/backup/mock_etcdRegistry_test.go | 422 --------------------------- pkg/maintenance/looseCoupling.go | 11 +- 3 files changed, 4 insertions(+), 441 deletions(-) delete mode 100644 pkg/backup/mock_etcdRegistry_test.go diff --git a/Jenkinsfile b/Jenkinsfile index 627aacd..ec74f33 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,18 +98,6 @@ node('docker') { } } - stage('Deploy etcd') { - withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'harborhelmchartpush', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD']]) { - k3d.helm("registry login ${registry} --username '${HARBOR_USERNAME}' --password '${HARBOR_PASSWORD}'") - k3d.helm("install k8s-etcd oci://${registry}/${registry_namespace}/k8s-etcd --version 3.5.9-1") - } - } - - stage('Wait for etcd to be ready') { - sleep(time: 5, unit: "SECONDS") - k3d.kubectl("wait --for=condition=ready pod -l statefulset.kubernetes.io/pod-name=etcd-0 --timeout=300s") - } - stage('Deploy Manager') { k3d.helm("install ${repositoryName}-crd ${helmCRDChartDir}") k3d.helm("install ${repositoryName} ${helmChartDir}") diff --git a/pkg/backup/mock_etcdRegistry_test.go b/pkg/backup/mock_etcdRegistry_test.go deleted file mode 100644 index 1db07cd..0000000 --- a/pkg/backup/mock_etcdRegistry_test.go +++ /dev/null @@ -1,422 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package backup - -import ( - registry "github.com/cloudogu/cesapp-lib/registry" - mock "github.com/stretchr/testify/mock" -) - -// mockEtcdRegistry is an autogenerated mock type for the etcdRegistry type -type mockEtcdRegistry struct { - mock.Mock -} - -type mockEtcdRegistry_Expecter struct { - mock *mock.Mock -} - -func (_m *mockEtcdRegistry) EXPECT() *mockEtcdRegistry_Expecter { - return &mockEtcdRegistry_Expecter{mock: &_m.Mock} -} - -// BlueprintRegistry provides a mock function with given fields: -func (_m *mockEtcdRegistry) BlueprintRegistry() registry.ConfigurationContext { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for BlueprintRegistry") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_BlueprintRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlueprintRegistry' -type mockEtcdRegistry_BlueprintRegistry_Call struct { - *mock.Call -} - -// BlueprintRegistry is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) BlueprintRegistry() *mockEtcdRegistry_BlueprintRegistry_Call { - return &mockEtcdRegistry_BlueprintRegistry_Call{Call: _e.mock.On("BlueprintRegistry")} -} - -func (_c *mockEtcdRegistry_BlueprintRegistry_Call) Run(run func()) *mockEtcdRegistry_BlueprintRegistry_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_BlueprintRegistry_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_BlueprintRegistry_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_BlueprintRegistry_Call) RunAndReturn(run func() registry.ConfigurationContext) *mockEtcdRegistry_BlueprintRegistry_Call { - _c.Call.Return(run) - return _c -} - -// DoguConfig provides a mock function with given fields: dogu -func (_m *mockEtcdRegistry) DoguConfig(dogu string) registry.ConfigurationContext { - ret := _m.Called(dogu) - - if len(ret) == 0 { - panic("no return value specified for DoguConfig") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { - r0 = rf(dogu) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_DoguConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoguConfig' -type mockEtcdRegistry_DoguConfig_Call struct { - *mock.Call -} - -// DoguConfig is a helper method to define mock.On call -// - dogu string -func (_e *mockEtcdRegistry_Expecter) DoguConfig(dogu interface{}) *mockEtcdRegistry_DoguConfig_Call { - return &mockEtcdRegistry_DoguConfig_Call{Call: _e.mock.On("DoguConfig", dogu)} -} - -func (_c *mockEtcdRegistry_DoguConfig_Call) Run(run func(dogu string)) *mockEtcdRegistry_DoguConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdRegistry_DoguConfig_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_DoguConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_DoguConfig_Call) RunAndReturn(run func(string) registry.ConfigurationContext) *mockEtcdRegistry_DoguConfig_Call { - _c.Call.Return(run) - return _c -} - -// DoguRegistry provides a mock function with given fields: -func (_m *mockEtcdRegistry) DoguRegistry() registry.DoguRegistry { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DoguRegistry") - } - - var r0 registry.DoguRegistry - if rf, ok := ret.Get(0).(func() registry.DoguRegistry); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.DoguRegistry) - } - } - - return r0 -} - -// mockEtcdRegistry_DoguRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoguRegistry' -type mockEtcdRegistry_DoguRegistry_Call struct { - *mock.Call -} - -// DoguRegistry is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) DoguRegistry() *mockEtcdRegistry_DoguRegistry_Call { - return &mockEtcdRegistry_DoguRegistry_Call{Call: _e.mock.On("DoguRegistry")} -} - -func (_c *mockEtcdRegistry_DoguRegistry_Call) Run(run func()) *mockEtcdRegistry_DoguRegistry_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_DoguRegistry_Call) Return(_a0 registry.DoguRegistry) *mockEtcdRegistry_DoguRegistry_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_DoguRegistry_Call) RunAndReturn(run func() registry.DoguRegistry) *mockEtcdRegistry_DoguRegistry_Call { - _c.Call.Return(run) - return _c -} - -// GetNode provides a mock function with given fields: -func (_m *mockEtcdRegistry) GetNode() (registry.Node, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNode") - } - - var r0 registry.Node - var r1 error - if rf, ok := ret.Get(0).(func() (registry.Node, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() registry.Node); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(registry.Node) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockEtcdRegistry_GetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNode' -type mockEtcdRegistry_GetNode_Call struct { - *mock.Call -} - -// GetNode is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) GetNode() *mockEtcdRegistry_GetNode_Call { - return &mockEtcdRegistry_GetNode_Call{Call: _e.mock.On("GetNode")} -} - -func (_c *mockEtcdRegistry_GetNode_Call) Run(run func()) *mockEtcdRegistry_GetNode_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_GetNode_Call) Return(_a0 registry.Node, _a1 error) *mockEtcdRegistry_GetNode_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockEtcdRegistry_GetNode_Call) RunAndReturn(run func() (registry.Node, error)) *mockEtcdRegistry_GetNode_Call { - _c.Call.Return(run) - return _c -} - -// GlobalConfig provides a mock function with given fields: -func (_m *mockEtcdRegistry) GlobalConfig() registry.ConfigurationContext { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GlobalConfig") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_GlobalConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GlobalConfig' -type mockEtcdRegistry_GlobalConfig_Call struct { - *mock.Call -} - -// GlobalConfig is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) GlobalConfig() *mockEtcdRegistry_GlobalConfig_Call { - return &mockEtcdRegistry_GlobalConfig_Call{Call: _e.mock.On("GlobalConfig")} -} - -func (_c *mockEtcdRegistry_GlobalConfig_Call) Run(run func()) *mockEtcdRegistry_GlobalConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_GlobalConfig_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_GlobalConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_GlobalConfig_Call) RunAndReturn(run func() registry.ConfigurationContext) *mockEtcdRegistry_GlobalConfig_Call { - _c.Call.Return(run) - return _c -} - -// HostConfig provides a mock function with given fields: hostService -func (_m *mockEtcdRegistry) HostConfig(hostService string) registry.ConfigurationContext { - ret := _m.Called(hostService) - - if len(ret) == 0 { - panic("no return value specified for HostConfig") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { - r0 = rf(hostService) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_HostConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HostConfig' -type mockEtcdRegistry_HostConfig_Call struct { - *mock.Call -} - -// HostConfig is a helper method to define mock.On call -// - hostService string -func (_e *mockEtcdRegistry_Expecter) HostConfig(hostService interface{}) *mockEtcdRegistry_HostConfig_Call { - return &mockEtcdRegistry_HostConfig_Call{Call: _e.mock.On("HostConfig", hostService)} -} - -func (_c *mockEtcdRegistry_HostConfig_Call) Run(run func(hostService string)) *mockEtcdRegistry_HostConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdRegistry_HostConfig_Call) Return(_a0 registry.ConfigurationContext) *mockEtcdRegistry_HostConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_HostConfig_Call) RunAndReturn(run func(string) registry.ConfigurationContext) *mockEtcdRegistry_HostConfig_Call { - _c.Call.Return(run) - return _c -} - -// RootConfig provides a mock function with given fields: -func (_m *mockEtcdRegistry) RootConfig() registry.WatchConfigurationContext { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RootConfig") - } - - var r0 registry.WatchConfigurationContext - if rf, ok := ret.Get(0).(func() registry.WatchConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.WatchConfigurationContext) - } - } - - return r0 -} - -// mockEtcdRegistry_RootConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RootConfig' -type mockEtcdRegistry_RootConfig_Call struct { - *mock.Call -} - -// RootConfig is a helper method to define mock.On call -func (_e *mockEtcdRegistry_Expecter) RootConfig() *mockEtcdRegistry_RootConfig_Call { - return &mockEtcdRegistry_RootConfig_Call{Call: _e.mock.On("RootConfig")} -} - -func (_c *mockEtcdRegistry_RootConfig_Call) Run(run func()) *mockEtcdRegistry_RootConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockEtcdRegistry_RootConfig_Call) Return(_a0 registry.WatchConfigurationContext) *mockEtcdRegistry_RootConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_RootConfig_Call) RunAndReturn(run func() registry.WatchConfigurationContext) *mockEtcdRegistry_RootConfig_Call { - _c.Call.Return(run) - return _c -} - -// State provides a mock function with given fields: dogu -func (_m *mockEtcdRegistry) State(dogu string) registry.State { - ret := _m.Called(dogu) - - if len(ret) == 0 { - panic("no return value specified for State") - } - - var r0 registry.State - if rf, ok := ret.Get(0).(func(string) registry.State); ok { - r0 = rf(dogu) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.State) - } - } - - return r0 -} - -// mockEtcdRegistry_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' -type mockEtcdRegistry_State_Call struct { - *mock.Call -} - -// State is a helper method to define mock.On call -// - dogu string -func (_e *mockEtcdRegistry_Expecter) State(dogu interface{}) *mockEtcdRegistry_State_Call { - return &mockEtcdRegistry_State_Call{Call: _e.mock.On("State", dogu)} -} - -func (_c *mockEtcdRegistry_State_Call) Run(run func(dogu string)) *mockEtcdRegistry_State_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockEtcdRegistry_State_Call) Return(_a0 registry.State) *mockEtcdRegistry_State_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockEtcdRegistry_State_Call) RunAndReturn(run func(string) registry.State) *mockEtcdRegistry_State_Call { - _c.Call.Return(run) - return _c -} - -// newMockEtcdRegistry creates a new instance of mockEtcdRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockEtcdRegistry(t interface { - mock.TestingT - Cleanup(func()) -}) *mockEtcdRegistry { - mock := &mockEtcdRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/maintenance/looseCoupling.go b/pkg/maintenance/looseCoupling.go index 196ce04..accaf81 100644 --- a/pkg/maintenance/looseCoupling.go +++ b/pkg/maintenance/looseCoupling.go @@ -2,16 +2,13 @@ package maintenance import ( "context" - "time" ) -var waitForEtcdTimeout = 5 * time.Minute - type looselyCoupledMaintenanceSwitch struct { maintenanceModeSwitch } -// NewWithLooseCoupling creates a switch that checks if the configuration registry (e.g., etcd) exists before switching. +// NewWithLooseCoupling creates a switch that checks if the configuration registry exists before switching. // If the registry does not exist, no switch is executed. func NewWithLooseCoupling(globalConfigRepository globalConfigRepository) *looselyCoupledMaintenanceSwitch { return &looselyCoupledMaintenanceSwitch{ @@ -19,14 +16,14 @@ func NewWithLooseCoupling(globalConfigRepository globalConfigRepository) *loosel } } -// ActivateMaintenanceMode activates the maintenance mode if the etcd exists and is ready. +// ActivateMaintenanceMode activates the maintenance mode if the global registry exists and is ready. // This loose coupling enables us to perform restores on an empty cluster. func (lcms *looselyCoupledMaintenanceSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { return lcms.maintenanceModeSwitch.ActivateMaintenanceMode(ctx, title, text) } -// DeactivateMaintenanceMode waits until the etcd is ready and then deactivates the maintenance mode. -// While this is not directly loose coupling, we trust that an instance of etcd will be restored. +// DeactivateMaintenanceMode waits until the global registry is ready and then deactivates the maintenance mode. +// While this is not directly loose coupling, we trust that an instance of the global registry will be restored. func (lcms *looselyCoupledMaintenanceSwitch) DeactivateMaintenanceMode(ctx context.Context) error { return lcms.maintenanceModeSwitch.DeactivateMaintenanceMode(ctx) } From 1b10b30ddd398cc37ae51ff97731786707430021 Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 9 Oct 2024 08:00:10 +0200 Subject: [PATCH 11/19] #31 use latest linter version --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 3123933..164172f 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ ARTIFACT_ID=k8s-backup-operator VERSION=0.11.0 IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION} GOTAG?=1.23 +LINT_VERSION=v1.61.0 MAKEFILES_VERSION=9.2.1 STAGE?=production From 5f1641bc3680d658bb89d16226d4e378922c1f65 Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 14 Oct 2024 15:53:41 +0200 Subject: [PATCH 12/19] #31 delete remaining etcd references --- pkg/backup/mock_configurationContext_test.go | 543 ------------------ pkg/maintenance/interfaces.go | 5 - pkg/maintenance/mock_globalConfig_test.go | 543 ------------------ pkg/restore/interfaces.go | 11 - pkg/restore/mock_cesRegistry_test.go | 422 -------------- pkg/restore/mock_configurationContext_test.go | 543 ------------------ 6 files changed, 2067 deletions(-) delete mode 100644 pkg/backup/mock_configurationContext_test.go delete mode 100644 pkg/maintenance/mock_globalConfig_test.go delete mode 100644 pkg/restore/mock_cesRegistry_test.go delete mode 100644 pkg/restore/mock_configurationContext_test.go diff --git a/pkg/backup/mock_configurationContext_test.go b/pkg/backup/mock_configurationContext_test.go deleted file mode 100644 index 96bcc17..0000000 --- a/pkg/backup/mock_configurationContext_test.go +++ /dev/null @@ -1,543 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package backup - -import mock "github.com/stretchr/testify/mock" - -// mockConfigurationContext is an autogenerated mock type for the configurationContext type -type mockConfigurationContext struct { - mock.Mock -} - -type mockConfigurationContext_Expecter struct { - mock *mock.Mock -} - -func (_m *mockConfigurationContext) EXPECT() *mockConfigurationContext_Expecter { - return &mockConfigurationContext_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: key -func (_m *mockConfigurationContext) Delete(key string) error { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type mockConfigurationContext_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) Delete(key interface{}) *mockConfigurationContext_Delete_Call { - return &mockConfigurationContext_Delete_Call{Call: _e.mock.On("Delete", key)} -} - -func (_c *mockConfigurationContext_Delete_Call) Run(run func(key string)) *mockConfigurationContext_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Delete_Call) Return(_a0 error) *mockConfigurationContext_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_Delete_Call) RunAndReturn(run func(string) error) *mockConfigurationContext_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRecursive provides a mock function with given fields: key -func (_m *mockConfigurationContext) DeleteRecursive(key string) error { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for DeleteRecursive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_DeleteRecursive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRecursive' -type mockConfigurationContext_DeleteRecursive_Call struct { - *mock.Call -} - -// DeleteRecursive is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) DeleteRecursive(key interface{}) *mockConfigurationContext_DeleteRecursive_Call { - return &mockConfigurationContext_DeleteRecursive_Call{Call: _e.mock.On("DeleteRecursive", key)} -} - -func (_c *mockConfigurationContext_DeleteRecursive_Call) Run(run func(key string)) *mockConfigurationContext_DeleteRecursive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_DeleteRecursive_Call) Return(_a0 error) *mockConfigurationContext_DeleteRecursive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_DeleteRecursive_Call) RunAndReturn(run func(string) error) *mockConfigurationContext_DeleteRecursive_Call { - _c.Call.Return(run) - return _c -} - -// Exists provides a mock function with given fields: key -func (_m *mockConfigurationContext) Exists(key string) (bool, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Exists") - } - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockConfigurationContext_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' -type mockConfigurationContext_Exists_Call struct { - *mock.Call -} - -// Exists is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) Exists(key interface{}) *mockConfigurationContext_Exists_Call { - return &mockConfigurationContext_Exists_Call{Call: _e.mock.On("Exists", key)} -} - -func (_c *mockConfigurationContext_Exists_Call) Run(run func(key string)) *mockConfigurationContext_Exists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Exists_Call) Return(_a0 bool, _a1 error) *mockConfigurationContext_Exists_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockConfigurationContext_Exists_Call) RunAndReturn(run func(string) (bool, error)) *mockConfigurationContext_Exists_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: key -func (_m *mockConfigurationContext) Get(key string) (string, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockConfigurationContext_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockConfigurationContext_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) Get(key interface{}) *mockConfigurationContext_Get_Call { - return &mockConfigurationContext_Get_Call{Call: _e.mock.On("Get", key)} -} - -func (_c *mockConfigurationContext_Get_Call) Run(run func(key string)) *mockConfigurationContext_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Get_Call) Return(_a0 string, _a1 error) *mockConfigurationContext_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockConfigurationContext_Get_Call) RunAndReturn(run func(string) (string, error)) *mockConfigurationContext_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetAll provides a mock function with given fields: -func (_m *mockConfigurationContext) GetAll() (map[string]string, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() map[string]string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockConfigurationContext_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' -type mockConfigurationContext_GetAll_Call struct { - *mock.Call -} - -// GetAll is a helper method to define mock.On call -func (_e *mockConfigurationContext_Expecter) GetAll() *mockConfigurationContext_GetAll_Call { - return &mockConfigurationContext_GetAll_Call{Call: _e.mock.On("GetAll")} -} - -func (_c *mockConfigurationContext_GetAll_Call) Run(run func()) *mockConfigurationContext_GetAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockConfigurationContext_GetAll_Call) Return(_a0 map[string]string, _a1 error) *mockConfigurationContext_GetAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockConfigurationContext_GetAll_Call) RunAndReturn(run func() (map[string]string, error)) *mockConfigurationContext_GetAll_Call { - _c.Call.Return(run) - return _c -} - -// GetOrFalse provides a mock function with given fields: key -func (_m *mockConfigurationContext) GetOrFalse(key string) (bool, string, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for GetOrFalse") - } - - var r0 bool - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(string) (bool, string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) string); ok { - r1 = rf(key) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(string) error); ok { - r2 = rf(key) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// mockConfigurationContext_GetOrFalse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrFalse' -type mockConfigurationContext_GetOrFalse_Call struct { - *mock.Call -} - -// GetOrFalse is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) GetOrFalse(key interface{}) *mockConfigurationContext_GetOrFalse_Call { - return &mockConfigurationContext_GetOrFalse_Call{Call: _e.mock.On("GetOrFalse", key)} -} - -func (_c *mockConfigurationContext_GetOrFalse_Call) Run(run func(key string)) *mockConfigurationContext_GetOrFalse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_GetOrFalse_Call) Return(_a0 bool, _a1 string, _a2 error) *mockConfigurationContext_GetOrFalse_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *mockConfigurationContext_GetOrFalse_Call) RunAndReturn(run func(string) (bool, string, error)) *mockConfigurationContext_GetOrFalse_Call { - _c.Call.Return(run) - return _c -} - -// Refresh provides a mock function with given fields: key, timeToLiveInSeconds -func (_m *mockConfigurationContext) Refresh(key string, timeToLiveInSeconds int) error { - ret := _m.Called(key, timeToLiveInSeconds) - - if len(ret) == 0 { - panic("no return value specified for Refresh") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, int) error); ok { - r0 = rf(key, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh' -type mockConfigurationContext_Refresh_Call struct { - *mock.Call -} - -// Refresh is a helper method to define mock.On call -// - key string -// - timeToLiveInSeconds int -func (_e *mockConfigurationContext_Expecter) Refresh(key interface{}, timeToLiveInSeconds interface{}) *mockConfigurationContext_Refresh_Call { - return &mockConfigurationContext_Refresh_Call{Call: _e.mock.On("Refresh", key, timeToLiveInSeconds)} -} - -func (_c *mockConfigurationContext_Refresh_Call) Run(run func(key string, timeToLiveInSeconds int)) *mockConfigurationContext_Refresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(int)) - }) - return _c -} - -func (_c *mockConfigurationContext_Refresh_Call) Return(_a0 error) *mockConfigurationContext_Refresh_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_Refresh_Call) RunAndReturn(run func(string, int) error) *mockConfigurationContext_Refresh_Call { - _c.Call.Return(run) - return _c -} - -// RemoveAll provides a mock function with given fields: -func (_m *mockConfigurationContext) RemoveAll() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RemoveAll") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' -type mockConfigurationContext_RemoveAll_Call struct { - *mock.Call -} - -// RemoveAll is a helper method to define mock.On call -func (_e *mockConfigurationContext_Expecter) RemoveAll() *mockConfigurationContext_RemoveAll_Call { - return &mockConfigurationContext_RemoveAll_Call{Call: _e.mock.On("RemoveAll")} -} - -func (_c *mockConfigurationContext_RemoveAll_Call) Run(run func()) *mockConfigurationContext_RemoveAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockConfigurationContext_RemoveAll_Call) Return(_a0 error) *mockConfigurationContext_RemoveAll_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_RemoveAll_Call) RunAndReturn(run func() error) *mockConfigurationContext_RemoveAll_Call { - _c.Call.Return(run) - return _c -} - -// Set provides a mock function with given fields: key, value -func (_m *mockConfigurationContext) Set(key string, value string) error { - ret := _m.Called(key, value) - - if len(ret) == 0 { - panic("no return value specified for Set") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(key, value) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type mockConfigurationContext_Set_Call struct { - *mock.Call -} - -// Set is a helper method to define mock.On call -// - key string -// - value string -func (_e *mockConfigurationContext_Expecter) Set(key interface{}, value interface{}) *mockConfigurationContext_Set_Call { - return &mockConfigurationContext_Set_Call{Call: _e.mock.On("Set", key, value)} -} - -func (_c *mockConfigurationContext_Set_Call) Run(run func(key string, value string)) *mockConfigurationContext_Set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Set_Call) Return(_a0 error) *mockConfigurationContext_Set_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_Set_Call) RunAndReturn(run func(string, string) error) *mockConfigurationContext_Set_Call { - _c.Call.Return(run) - return _c -} - -// SetWithLifetime provides a mock function with given fields: key, value, timeToLiveInSeconds -func (_m *mockConfigurationContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { - ret := _m.Called(key, value, timeToLiveInSeconds) - - if len(ret) == 0 { - panic("no return value specified for SetWithLifetime") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, int) error); ok { - r0 = rf(key, value, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_SetWithLifetime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWithLifetime' -type mockConfigurationContext_SetWithLifetime_Call struct { - *mock.Call -} - -// SetWithLifetime is a helper method to define mock.On call -// - key string -// - value string -// - timeToLiveInSeconds int -func (_e *mockConfigurationContext_Expecter) SetWithLifetime(key interface{}, value interface{}, timeToLiveInSeconds interface{}) *mockConfigurationContext_SetWithLifetime_Call { - return &mockConfigurationContext_SetWithLifetime_Call{Call: _e.mock.On("SetWithLifetime", key, value, timeToLiveInSeconds)} -} - -func (_c *mockConfigurationContext_SetWithLifetime_Call) Run(run func(key string, value string, timeToLiveInSeconds int)) *mockConfigurationContext_SetWithLifetime_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *mockConfigurationContext_SetWithLifetime_Call) Return(_a0 error) *mockConfigurationContext_SetWithLifetime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_SetWithLifetime_Call) RunAndReturn(run func(string, string, int) error) *mockConfigurationContext_SetWithLifetime_Call { - _c.Call.Return(run) - return _c -} - -// newMockConfigurationContext creates a new instance of mockConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockConfigurationContext(t interface { - mock.TestingT - Cleanup(func()) -}) *mockConfigurationContext { - mock := &mockConfigurationContext{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/maintenance/interfaces.go b/pkg/maintenance/interfaces.go index a976fc6..c1d4679 100644 --- a/pkg/maintenance/interfaces.go +++ b/pkg/maintenance/interfaces.go @@ -2,7 +2,6 @@ package maintenance import ( "context" - "github.com/cloudogu/cesapp-lib/registry" "github.com/cloudogu/k8s-registry-lib/config" "k8s.io/apimachinery/pkg/watch" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" @@ -24,10 +23,6 @@ type serviceInterface interface { corev1.ServiceInterface } -type globalConfig interface { - registry.ConfigurationContext -} - // used for mocks //nolint:unused diff --git a/pkg/maintenance/mock_globalConfig_test.go b/pkg/maintenance/mock_globalConfig_test.go deleted file mode 100644 index 2a366ec..0000000 --- a/pkg/maintenance/mock_globalConfig_test.go +++ /dev/null @@ -1,543 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package maintenance - -import mock "github.com/stretchr/testify/mock" - -// mockGlobalConfig is an autogenerated mock type for the globalConfig type -type mockGlobalConfig struct { - mock.Mock -} - -type mockGlobalConfig_Expecter struct { - mock *mock.Mock -} - -func (_m *mockGlobalConfig) EXPECT() *mockGlobalConfig_Expecter { - return &mockGlobalConfig_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: key -func (_m *mockGlobalConfig) Delete(key string) error { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockGlobalConfig_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type mockGlobalConfig_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - key string -func (_e *mockGlobalConfig_Expecter) Delete(key interface{}) *mockGlobalConfig_Delete_Call { - return &mockGlobalConfig_Delete_Call{Call: _e.mock.On("Delete", key)} -} - -func (_c *mockGlobalConfig_Delete_Call) Run(run func(key string)) *mockGlobalConfig_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockGlobalConfig_Delete_Call) Return(_a0 error) *mockGlobalConfig_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockGlobalConfig_Delete_Call) RunAndReturn(run func(string) error) *mockGlobalConfig_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRecursive provides a mock function with given fields: key -func (_m *mockGlobalConfig) DeleteRecursive(key string) error { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for DeleteRecursive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockGlobalConfig_DeleteRecursive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRecursive' -type mockGlobalConfig_DeleteRecursive_Call struct { - *mock.Call -} - -// DeleteRecursive is a helper method to define mock.On call -// - key string -func (_e *mockGlobalConfig_Expecter) DeleteRecursive(key interface{}) *mockGlobalConfig_DeleteRecursive_Call { - return &mockGlobalConfig_DeleteRecursive_Call{Call: _e.mock.On("DeleteRecursive", key)} -} - -func (_c *mockGlobalConfig_DeleteRecursive_Call) Run(run func(key string)) *mockGlobalConfig_DeleteRecursive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockGlobalConfig_DeleteRecursive_Call) Return(_a0 error) *mockGlobalConfig_DeleteRecursive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockGlobalConfig_DeleteRecursive_Call) RunAndReturn(run func(string) error) *mockGlobalConfig_DeleteRecursive_Call { - _c.Call.Return(run) - return _c -} - -// Exists provides a mock function with given fields: key -func (_m *mockGlobalConfig) Exists(key string) (bool, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Exists") - } - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfig_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' -type mockGlobalConfig_Exists_Call struct { - *mock.Call -} - -// Exists is a helper method to define mock.On call -// - key string -func (_e *mockGlobalConfig_Expecter) Exists(key interface{}) *mockGlobalConfig_Exists_Call { - return &mockGlobalConfig_Exists_Call{Call: _e.mock.On("Exists", key)} -} - -func (_c *mockGlobalConfig_Exists_Call) Run(run func(key string)) *mockGlobalConfig_Exists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockGlobalConfig_Exists_Call) Return(_a0 bool, _a1 error) *mockGlobalConfig_Exists_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfig_Exists_Call) RunAndReturn(run func(string) (bool, error)) *mockGlobalConfig_Exists_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: key -func (_m *mockGlobalConfig) Get(key string) (string, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfig_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockGlobalConfig_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - key string -func (_e *mockGlobalConfig_Expecter) Get(key interface{}) *mockGlobalConfig_Get_Call { - return &mockGlobalConfig_Get_Call{Call: _e.mock.On("Get", key)} -} - -func (_c *mockGlobalConfig_Get_Call) Run(run func(key string)) *mockGlobalConfig_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockGlobalConfig_Get_Call) Return(_a0 string, _a1 error) *mockGlobalConfig_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfig_Get_Call) RunAndReturn(run func(string) (string, error)) *mockGlobalConfig_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetAll provides a mock function with given fields: -func (_m *mockGlobalConfig) GetAll() (map[string]string, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() map[string]string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfig_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' -type mockGlobalConfig_GetAll_Call struct { - *mock.Call -} - -// GetAll is a helper method to define mock.On call -func (_e *mockGlobalConfig_Expecter) GetAll() *mockGlobalConfig_GetAll_Call { - return &mockGlobalConfig_GetAll_Call{Call: _e.mock.On("GetAll")} -} - -func (_c *mockGlobalConfig_GetAll_Call) Run(run func()) *mockGlobalConfig_GetAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockGlobalConfig_GetAll_Call) Return(_a0 map[string]string, _a1 error) *mockGlobalConfig_GetAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfig_GetAll_Call) RunAndReturn(run func() (map[string]string, error)) *mockGlobalConfig_GetAll_Call { - _c.Call.Return(run) - return _c -} - -// GetOrFalse provides a mock function with given fields: key -func (_m *mockGlobalConfig) GetOrFalse(key string) (bool, string, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for GetOrFalse") - } - - var r0 bool - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(string) (bool, string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) string); ok { - r1 = rf(key) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(string) error); ok { - r2 = rf(key) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// mockGlobalConfig_GetOrFalse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrFalse' -type mockGlobalConfig_GetOrFalse_Call struct { - *mock.Call -} - -// GetOrFalse is a helper method to define mock.On call -// - key string -func (_e *mockGlobalConfig_Expecter) GetOrFalse(key interface{}) *mockGlobalConfig_GetOrFalse_Call { - return &mockGlobalConfig_GetOrFalse_Call{Call: _e.mock.On("GetOrFalse", key)} -} - -func (_c *mockGlobalConfig_GetOrFalse_Call) Run(run func(key string)) *mockGlobalConfig_GetOrFalse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockGlobalConfig_GetOrFalse_Call) Return(_a0 bool, _a1 string, _a2 error) *mockGlobalConfig_GetOrFalse_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *mockGlobalConfig_GetOrFalse_Call) RunAndReturn(run func(string) (bool, string, error)) *mockGlobalConfig_GetOrFalse_Call { - _c.Call.Return(run) - return _c -} - -// Refresh provides a mock function with given fields: key, timeToLiveInSeconds -func (_m *mockGlobalConfig) Refresh(key string, timeToLiveInSeconds int) error { - ret := _m.Called(key, timeToLiveInSeconds) - - if len(ret) == 0 { - panic("no return value specified for Refresh") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, int) error); ok { - r0 = rf(key, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockGlobalConfig_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh' -type mockGlobalConfig_Refresh_Call struct { - *mock.Call -} - -// Refresh is a helper method to define mock.On call -// - key string -// - timeToLiveInSeconds int -func (_e *mockGlobalConfig_Expecter) Refresh(key interface{}, timeToLiveInSeconds interface{}) *mockGlobalConfig_Refresh_Call { - return &mockGlobalConfig_Refresh_Call{Call: _e.mock.On("Refresh", key, timeToLiveInSeconds)} -} - -func (_c *mockGlobalConfig_Refresh_Call) Run(run func(key string, timeToLiveInSeconds int)) *mockGlobalConfig_Refresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(int)) - }) - return _c -} - -func (_c *mockGlobalConfig_Refresh_Call) Return(_a0 error) *mockGlobalConfig_Refresh_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockGlobalConfig_Refresh_Call) RunAndReturn(run func(string, int) error) *mockGlobalConfig_Refresh_Call { - _c.Call.Return(run) - return _c -} - -// RemoveAll provides a mock function with given fields: -func (_m *mockGlobalConfig) RemoveAll() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RemoveAll") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockGlobalConfig_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' -type mockGlobalConfig_RemoveAll_Call struct { - *mock.Call -} - -// RemoveAll is a helper method to define mock.On call -func (_e *mockGlobalConfig_Expecter) RemoveAll() *mockGlobalConfig_RemoveAll_Call { - return &mockGlobalConfig_RemoveAll_Call{Call: _e.mock.On("RemoveAll")} -} - -func (_c *mockGlobalConfig_RemoveAll_Call) Run(run func()) *mockGlobalConfig_RemoveAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockGlobalConfig_RemoveAll_Call) Return(_a0 error) *mockGlobalConfig_RemoveAll_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockGlobalConfig_RemoveAll_Call) RunAndReturn(run func() error) *mockGlobalConfig_RemoveAll_Call { - _c.Call.Return(run) - return _c -} - -// Set provides a mock function with given fields: key, value -func (_m *mockGlobalConfig) Set(key string, value string) error { - ret := _m.Called(key, value) - - if len(ret) == 0 { - panic("no return value specified for Set") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(key, value) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockGlobalConfig_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type mockGlobalConfig_Set_Call struct { - *mock.Call -} - -// Set is a helper method to define mock.On call -// - key string -// - value string -func (_e *mockGlobalConfig_Expecter) Set(key interface{}, value interface{}) *mockGlobalConfig_Set_Call { - return &mockGlobalConfig_Set_Call{Call: _e.mock.On("Set", key, value)} -} - -func (_c *mockGlobalConfig_Set_Call) Run(run func(key string, value string)) *mockGlobalConfig_Set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *mockGlobalConfig_Set_Call) Return(_a0 error) *mockGlobalConfig_Set_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockGlobalConfig_Set_Call) RunAndReturn(run func(string, string) error) *mockGlobalConfig_Set_Call { - _c.Call.Return(run) - return _c -} - -// SetWithLifetime provides a mock function with given fields: key, value, timeToLiveInSeconds -func (_m *mockGlobalConfig) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { - ret := _m.Called(key, value, timeToLiveInSeconds) - - if len(ret) == 0 { - panic("no return value specified for SetWithLifetime") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, int) error); ok { - r0 = rf(key, value, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockGlobalConfig_SetWithLifetime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWithLifetime' -type mockGlobalConfig_SetWithLifetime_Call struct { - *mock.Call -} - -// SetWithLifetime is a helper method to define mock.On call -// - key string -// - value string -// - timeToLiveInSeconds int -func (_e *mockGlobalConfig_Expecter) SetWithLifetime(key interface{}, value interface{}, timeToLiveInSeconds interface{}) *mockGlobalConfig_SetWithLifetime_Call { - return &mockGlobalConfig_SetWithLifetime_Call{Call: _e.mock.On("SetWithLifetime", key, value, timeToLiveInSeconds)} -} - -func (_c *mockGlobalConfig_SetWithLifetime_Call) Run(run func(key string, value string, timeToLiveInSeconds int)) *mockGlobalConfig_SetWithLifetime_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *mockGlobalConfig_SetWithLifetime_Call) Return(_a0 error) *mockGlobalConfig_SetWithLifetime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockGlobalConfig_SetWithLifetime_Call) RunAndReturn(run func(string, string, int) error) *mockGlobalConfig_SetWithLifetime_Call { - _c.Call.Return(run) - return _c -} - -// newMockGlobalConfig creates a new instance of mockGlobalConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGlobalConfig(t interface { - mock.TestingT - Cleanup(func()) -}) *mockGlobalConfig { - mock := &mockGlobalConfig{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/restore/interfaces.go b/pkg/restore/interfaces.go index b79fb48..f3d8172 100644 --- a/pkg/restore/interfaces.go +++ b/pkg/restore/interfaces.go @@ -9,7 +9,6 @@ import ( "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" - "github.com/cloudogu/cesapp-lib/registry" "github.com/cloudogu/k8s-backup-operator/pkg/api/ecosystem" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" "github.com/cloudogu/k8s-backup-operator/pkg/provider" @@ -51,10 +50,6 @@ type maintenanceModeSwitch interface { DeactivateMaintenanceMode(ctx context.Context) error } -type cesRegistry interface { - registry.Registry -} - type cleanupManager interface { cleanup.Manager } @@ -97,12 +92,6 @@ type ecosystemV1Alpha1Interface interface { ecosystem.V1Alpha1Interface } -//nolint:unused -//goland:noinspection GoUnusedType -type configurationContext interface { - registry.ConfigurationContext -} - //nolint:unused //goland:noinspection GoUnusedType type restoreProvider interface { diff --git a/pkg/restore/mock_cesRegistry_test.go b/pkg/restore/mock_cesRegistry_test.go deleted file mode 100644 index 64fcf34..0000000 --- a/pkg/restore/mock_cesRegistry_test.go +++ /dev/null @@ -1,422 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package restore - -import ( - registry "github.com/cloudogu/cesapp-lib/registry" - mock "github.com/stretchr/testify/mock" -) - -// mockCesRegistry is an autogenerated mock type for the cesRegistry type -type mockCesRegistry struct { - mock.Mock -} - -type mockCesRegistry_Expecter struct { - mock *mock.Mock -} - -func (_m *mockCesRegistry) EXPECT() *mockCesRegistry_Expecter { - return &mockCesRegistry_Expecter{mock: &_m.Mock} -} - -// BlueprintRegistry provides a mock function with given fields: -func (_m *mockCesRegistry) BlueprintRegistry() registry.ConfigurationContext { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for BlueprintRegistry") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockCesRegistry_BlueprintRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlueprintRegistry' -type mockCesRegistry_BlueprintRegistry_Call struct { - *mock.Call -} - -// BlueprintRegistry is a helper method to define mock.On call -func (_e *mockCesRegistry_Expecter) BlueprintRegistry() *mockCesRegistry_BlueprintRegistry_Call { - return &mockCesRegistry_BlueprintRegistry_Call{Call: _e.mock.On("BlueprintRegistry")} -} - -func (_c *mockCesRegistry_BlueprintRegistry_Call) Run(run func()) *mockCesRegistry_BlueprintRegistry_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockCesRegistry_BlueprintRegistry_Call) Return(_a0 registry.ConfigurationContext) *mockCesRegistry_BlueprintRegistry_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_BlueprintRegistry_Call) RunAndReturn(run func() registry.ConfigurationContext) *mockCesRegistry_BlueprintRegistry_Call { - _c.Call.Return(run) - return _c -} - -// DoguConfig provides a mock function with given fields: dogu -func (_m *mockCesRegistry) DoguConfig(dogu string) registry.ConfigurationContext { - ret := _m.Called(dogu) - - if len(ret) == 0 { - panic("no return value specified for DoguConfig") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { - r0 = rf(dogu) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockCesRegistry_DoguConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoguConfig' -type mockCesRegistry_DoguConfig_Call struct { - *mock.Call -} - -// DoguConfig is a helper method to define mock.On call -// - dogu string -func (_e *mockCesRegistry_Expecter) DoguConfig(dogu interface{}) *mockCesRegistry_DoguConfig_Call { - return &mockCesRegistry_DoguConfig_Call{Call: _e.mock.On("DoguConfig", dogu)} -} - -func (_c *mockCesRegistry_DoguConfig_Call) Run(run func(dogu string)) *mockCesRegistry_DoguConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockCesRegistry_DoguConfig_Call) Return(_a0 registry.ConfigurationContext) *mockCesRegistry_DoguConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_DoguConfig_Call) RunAndReturn(run func(string) registry.ConfigurationContext) *mockCesRegistry_DoguConfig_Call { - _c.Call.Return(run) - return _c -} - -// DoguRegistry provides a mock function with given fields: -func (_m *mockCesRegistry) DoguRegistry() registry.DoguRegistry { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DoguRegistry") - } - - var r0 registry.DoguRegistry - if rf, ok := ret.Get(0).(func() registry.DoguRegistry); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.DoguRegistry) - } - } - - return r0 -} - -// mockCesRegistry_DoguRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoguRegistry' -type mockCesRegistry_DoguRegistry_Call struct { - *mock.Call -} - -// DoguRegistry is a helper method to define mock.On call -func (_e *mockCesRegistry_Expecter) DoguRegistry() *mockCesRegistry_DoguRegistry_Call { - return &mockCesRegistry_DoguRegistry_Call{Call: _e.mock.On("DoguRegistry")} -} - -func (_c *mockCesRegistry_DoguRegistry_Call) Run(run func()) *mockCesRegistry_DoguRegistry_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockCesRegistry_DoguRegistry_Call) Return(_a0 registry.DoguRegistry) *mockCesRegistry_DoguRegistry_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_DoguRegistry_Call) RunAndReturn(run func() registry.DoguRegistry) *mockCesRegistry_DoguRegistry_Call { - _c.Call.Return(run) - return _c -} - -// GetNode provides a mock function with given fields: -func (_m *mockCesRegistry) GetNode() (registry.Node, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNode") - } - - var r0 registry.Node - var r1 error - if rf, ok := ret.Get(0).(func() (registry.Node, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() registry.Node); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(registry.Node) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockCesRegistry_GetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNode' -type mockCesRegistry_GetNode_Call struct { - *mock.Call -} - -// GetNode is a helper method to define mock.On call -func (_e *mockCesRegistry_Expecter) GetNode() *mockCesRegistry_GetNode_Call { - return &mockCesRegistry_GetNode_Call{Call: _e.mock.On("GetNode")} -} - -func (_c *mockCesRegistry_GetNode_Call) Run(run func()) *mockCesRegistry_GetNode_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockCesRegistry_GetNode_Call) Return(_a0 registry.Node, _a1 error) *mockCesRegistry_GetNode_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockCesRegistry_GetNode_Call) RunAndReturn(run func() (registry.Node, error)) *mockCesRegistry_GetNode_Call { - _c.Call.Return(run) - return _c -} - -// GlobalConfig provides a mock function with given fields: -func (_m *mockCesRegistry) GlobalConfig() registry.ConfigurationContext { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GlobalConfig") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func() registry.ConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockCesRegistry_GlobalConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GlobalConfig' -type mockCesRegistry_GlobalConfig_Call struct { - *mock.Call -} - -// GlobalConfig is a helper method to define mock.On call -func (_e *mockCesRegistry_Expecter) GlobalConfig() *mockCesRegistry_GlobalConfig_Call { - return &mockCesRegistry_GlobalConfig_Call{Call: _e.mock.On("GlobalConfig")} -} - -func (_c *mockCesRegistry_GlobalConfig_Call) Run(run func()) *mockCesRegistry_GlobalConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockCesRegistry_GlobalConfig_Call) Return(_a0 registry.ConfigurationContext) *mockCesRegistry_GlobalConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_GlobalConfig_Call) RunAndReturn(run func() registry.ConfigurationContext) *mockCesRegistry_GlobalConfig_Call { - _c.Call.Return(run) - return _c -} - -// HostConfig provides a mock function with given fields: hostService -func (_m *mockCesRegistry) HostConfig(hostService string) registry.ConfigurationContext { - ret := _m.Called(hostService) - - if len(ret) == 0 { - panic("no return value specified for HostConfig") - } - - var r0 registry.ConfigurationContext - if rf, ok := ret.Get(0).(func(string) registry.ConfigurationContext); ok { - r0 = rf(hostService) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.ConfigurationContext) - } - } - - return r0 -} - -// mockCesRegistry_HostConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HostConfig' -type mockCesRegistry_HostConfig_Call struct { - *mock.Call -} - -// HostConfig is a helper method to define mock.On call -// - hostService string -func (_e *mockCesRegistry_Expecter) HostConfig(hostService interface{}) *mockCesRegistry_HostConfig_Call { - return &mockCesRegistry_HostConfig_Call{Call: _e.mock.On("HostConfig", hostService)} -} - -func (_c *mockCesRegistry_HostConfig_Call) Run(run func(hostService string)) *mockCesRegistry_HostConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockCesRegistry_HostConfig_Call) Return(_a0 registry.ConfigurationContext) *mockCesRegistry_HostConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_HostConfig_Call) RunAndReturn(run func(string) registry.ConfigurationContext) *mockCesRegistry_HostConfig_Call { - _c.Call.Return(run) - return _c -} - -// RootConfig provides a mock function with given fields: -func (_m *mockCesRegistry) RootConfig() registry.WatchConfigurationContext { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RootConfig") - } - - var r0 registry.WatchConfigurationContext - if rf, ok := ret.Get(0).(func() registry.WatchConfigurationContext); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.WatchConfigurationContext) - } - } - - return r0 -} - -// mockCesRegistry_RootConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RootConfig' -type mockCesRegistry_RootConfig_Call struct { - *mock.Call -} - -// RootConfig is a helper method to define mock.On call -func (_e *mockCesRegistry_Expecter) RootConfig() *mockCesRegistry_RootConfig_Call { - return &mockCesRegistry_RootConfig_Call{Call: _e.mock.On("RootConfig")} -} - -func (_c *mockCesRegistry_RootConfig_Call) Run(run func()) *mockCesRegistry_RootConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockCesRegistry_RootConfig_Call) Return(_a0 registry.WatchConfigurationContext) *mockCesRegistry_RootConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_RootConfig_Call) RunAndReturn(run func() registry.WatchConfigurationContext) *mockCesRegistry_RootConfig_Call { - _c.Call.Return(run) - return _c -} - -// State provides a mock function with given fields: dogu -func (_m *mockCesRegistry) State(dogu string) registry.State { - ret := _m.Called(dogu) - - if len(ret) == 0 { - panic("no return value specified for State") - } - - var r0 registry.State - if rf, ok := ret.Get(0).(func(string) registry.State); ok { - r0 = rf(dogu) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(registry.State) - } - } - - return r0 -} - -// mockCesRegistry_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' -type mockCesRegistry_State_Call struct { - *mock.Call -} - -// State is a helper method to define mock.On call -// - dogu string -func (_e *mockCesRegistry_Expecter) State(dogu interface{}) *mockCesRegistry_State_Call { - return &mockCesRegistry_State_Call{Call: _e.mock.On("State", dogu)} -} - -func (_c *mockCesRegistry_State_Call) Run(run func(dogu string)) *mockCesRegistry_State_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockCesRegistry_State_Call) Return(_a0 registry.State) *mockCesRegistry_State_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockCesRegistry_State_Call) RunAndReturn(run func(string) registry.State) *mockCesRegistry_State_Call { - _c.Call.Return(run) - return _c -} - -// newMockCesRegistry creates a new instance of mockCesRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockCesRegistry(t interface { - mock.TestingT - Cleanup(func()) -}) *mockCesRegistry { - mock := &mockCesRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/restore/mock_configurationContext_test.go b/pkg/restore/mock_configurationContext_test.go deleted file mode 100644 index 0387be7..0000000 --- a/pkg/restore/mock_configurationContext_test.go +++ /dev/null @@ -1,543 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package restore - -import mock "github.com/stretchr/testify/mock" - -// mockConfigurationContext is an autogenerated mock type for the configurationContext type -type mockConfigurationContext struct { - mock.Mock -} - -type mockConfigurationContext_Expecter struct { - mock *mock.Mock -} - -func (_m *mockConfigurationContext) EXPECT() *mockConfigurationContext_Expecter { - return &mockConfigurationContext_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: key -func (_m *mockConfigurationContext) Delete(key string) error { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type mockConfigurationContext_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) Delete(key interface{}) *mockConfigurationContext_Delete_Call { - return &mockConfigurationContext_Delete_Call{Call: _e.mock.On("Delete", key)} -} - -func (_c *mockConfigurationContext_Delete_Call) Run(run func(key string)) *mockConfigurationContext_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Delete_Call) Return(_a0 error) *mockConfigurationContext_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_Delete_Call) RunAndReturn(run func(string) error) *mockConfigurationContext_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRecursive provides a mock function with given fields: key -func (_m *mockConfigurationContext) DeleteRecursive(key string) error { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for DeleteRecursive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_DeleteRecursive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRecursive' -type mockConfigurationContext_DeleteRecursive_Call struct { - *mock.Call -} - -// DeleteRecursive is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) DeleteRecursive(key interface{}) *mockConfigurationContext_DeleteRecursive_Call { - return &mockConfigurationContext_DeleteRecursive_Call{Call: _e.mock.On("DeleteRecursive", key)} -} - -func (_c *mockConfigurationContext_DeleteRecursive_Call) Run(run func(key string)) *mockConfigurationContext_DeleteRecursive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_DeleteRecursive_Call) Return(_a0 error) *mockConfigurationContext_DeleteRecursive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_DeleteRecursive_Call) RunAndReturn(run func(string) error) *mockConfigurationContext_DeleteRecursive_Call { - _c.Call.Return(run) - return _c -} - -// Exists provides a mock function with given fields: key -func (_m *mockConfigurationContext) Exists(key string) (bool, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Exists") - } - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockConfigurationContext_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' -type mockConfigurationContext_Exists_Call struct { - *mock.Call -} - -// Exists is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) Exists(key interface{}) *mockConfigurationContext_Exists_Call { - return &mockConfigurationContext_Exists_Call{Call: _e.mock.On("Exists", key)} -} - -func (_c *mockConfigurationContext_Exists_Call) Run(run func(key string)) *mockConfigurationContext_Exists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Exists_Call) Return(_a0 bool, _a1 error) *mockConfigurationContext_Exists_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockConfigurationContext_Exists_Call) RunAndReturn(run func(string) (bool, error)) *mockConfigurationContext_Exists_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: key -func (_m *mockConfigurationContext) Get(key string) (string, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockConfigurationContext_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockConfigurationContext_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) Get(key interface{}) *mockConfigurationContext_Get_Call { - return &mockConfigurationContext_Get_Call{Call: _e.mock.On("Get", key)} -} - -func (_c *mockConfigurationContext_Get_Call) Run(run func(key string)) *mockConfigurationContext_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Get_Call) Return(_a0 string, _a1 error) *mockConfigurationContext_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockConfigurationContext_Get_Call) RunAndReturn(run func(string) (string, error)) *mockConfigurationContext_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetAll provides a mock function with given fields: -func (_m *mockConfigurationContext) GetAll() (map[string]string, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func() (map[string]string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() map[string]string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockConfigurationContext_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' -type mockConfigurationContext_GetAll_Call struct { - *mock.Call -} - -// GetAll is a helper method to define mock.On call -func (_e *mockConfigurationContext_Expecter) GetAll() *mockConfigurationContext_GetAll_Call { - return &mockConfigurationContext_GetAll_Call{Call: _e.mock.On("GetAll")} -} - -func (_c *mockConfigurationContext_GetAll_Call) Run(run func()) *mockConfigurationContext_GetAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockConfigurationContext_GetAll_Call) Return(_a0 map[string]string, _a1 error) *mockConfigurationContext_GetAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockConfigurationContext_GetAll_Call) RunAndReturn(run func() (map[string]string, error)) *mockConfigurationContext_GetAll_Call { - _c.Call.Return(run) - return _c -} - -// GetOrFalse provides a mock function with given fields: key -func (_m *mockConfigurationContext) GetOrFalse(key string) (bool, string, error) { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for GetOrFalse") - } - - var r0 bool - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(string) (bool, string, error)); ok { - return rf(key) - } - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(key) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(string) string); ok { - r1 = rf(key) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(string) error); ok { - r2 = rf(key) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// mockConfigurationContext_GetOrFalse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrFalse' -type mockConfigurationContext_GetOrFalse_Call struct { - *mock.Call -} - -// GetOrFalse is a helper method to define mock.On call -// - key string -func (_e *mockConfigurationContext_Expecter) GetOrFalse(key interface{}) *mockConfigurationContext_GetOrFalse_Call { - return &mockConfigurationContext_GetOrFalse_Call{Call: _e.mock.On("GetOrFalse", key)} -} - -func (_c *mockConfigurationContext_GetOrFalse_Call) Run(run func(key string)) *mockConfigurationContext_GetOrFalse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_GetOrFalse_Call) Return(_a0 bool, _a1 string, _a2 error) *mockConfigurationContext_GetOrFalse_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *mockConfigurationContext_GetOrFalse_Call) RunAndReturn(run func(string) (bool, string, error)) *mockConfigurationContext_GetOrFalse_Call { - _c.Call.Return(run) - return _c -} - -// Refresh provides a mock function with given fields: key, timeToLiveInSeconds -func (_m *mockConfigurationContext) Refresh(key string, timeToLiveInSeconds int) error { - ret := _m.Called(key, timeToLiveInSeconds) - - if len(ret) == 0 { - panic("no return value specified for Refresh") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, int) error); ok { - r0 = rf(key, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh' -type mockConfigurationContext_Refresh_Call struct { - *mock.Call -} - -// Refresh is a helper method to define mock.On call -// - key string -// - timeToLiveInSeconds int -func (_e *mockConfigurationContext_Expecter) Refresh(key interface{}, timeToLiveInSeconds interface{}) *mockConfigurationContext_Refresh_Call { - return &mockConfigurationContext_Refresh_Call{Call: _e.mock.On("Refresh", key, timeToLiveInSeconds)} -} - -func (_c *mockConfigurationContext_Refresh_Call) Run(run func(key string, timeToLiveInSeconds int)) *mockConfigurationContext_Refresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(int)) - }) - return _c -} - -func (_c *mockConfigurationContext_Refresh_Call) Return(_a0 error) *mockConfigurationContext_Refresh_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_Refresh_Call) RunAndReturn(run func(string, int) error) *mockConfigurationContext_Refresh_Call { - _c.Call.Return(run) - return _c -} - -// RemoveAll provides a mock function with given fields: -func (_m *mockConfigurationContext) RemoveAll() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RemoveAll") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' -type mockConfigurationContext_RemoveAll_Call struct { - *mock.Call -} - -// RemoveAll is a helper method to define mock.On call -func (_e *mockConfigurationContext_Expecter) RemoveAll() *mockConfigurationContext_RemoveAll_Call { - return &mockConfigurationContext_RemoveAll_Call{Call: _e.mock.On("RemoveAll")} -} - -func (_c *mockConfigurationContext_RemoveAll_Call) Run(run func()) *mockConfigurationContext_RemoveAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockConfigurationContext_RemoveAll_Call) Return(_a0 error) *mockConfigurationContext_RemoveAll_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_RemoveAll_Call) RunAndReturn(run func() error) *mockConfigurationContext_RemoveAll_Call { - _c.Call.Return(run) - return _c -} - -// Set provides a mock function with given fields: key, value -func (_m *mockConfigurationContext) Set(key string, value string) error { - ret := _m.Called(key, value) - - if len(ret) == 0 { - panic("no return value specified for Set") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(key, value) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type mockConfigurationContext_Set_Call struct { - *mock.Call -} - -// Set is a helper method to define mock.On call -// - key string -// - value string -func (_e *mockConfigurationContext_Expecter) Set(key interface{}, value interface{}) *mockConfigurationContext_Set_Call { - return &mockConfigurationContext_Set_Call{Call: _e.mock.On("Set", key, value)} -} - -func (_c *mockConfigurationContext_Set_Call) Run(run func(key string, value string)) *mockConfigurationContext_Set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *mockConfigurationContext_Set_Call) Return(_a0 error) *mockConfigurationContext_Set_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_Set_Call) RunAndReturn(run func(string, string) error) *mockConfigurationContext_Set_Call { - _c.Call.Return(run) - return _c -} - -// SetWithLifetime provides a mock function with given fields: key, value, timeToLiveInSeconds -func (_m *mockConfigurationContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error { - ret := _m.Called(key, value, timeToLiveInSeconds) - - if len(ret) == 0 { - panic("no return value specified for SetWithLifetime") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, int) error); ok { - r0 = rf(key, value, timeToLiveInSeconds) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockConfigurationContext_SetWithLifetime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWithLifetime' -type mockConfigurationContext_SetWithLifetime_Call struct { - *mock.Call -} - -// SetWithLifetime is a helper method to define mock.On call -// - key string -// - value string -// - timeToLiveInSeconds int -func (_e *mockConfigurationContext_Expecter) SetWithLifetime(key interface{}, value interface{}, timeToLiveInSeconds interface{}) *mockConfigurationContext_SetWithLifetime_Call { - return &mockConfigurationContext_SetWithLifetime_Call{Call: _e.mock.On("SetWithLifetime", key, value, timeToLiveInSeconds)} -} - -func (_c *mockConfigurationContext_SetWithLifetime_Call) Run(run func(key string, value string, timeToLiveInSeconds int)) *mockConfigurationContext_SetWithLifetime_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *mockConfigurationContext_SetWithLifetime_Call) Return(_a0 error) *mockConfigurationContext_SetWithLifetime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockConfigurationContext_SetWithLifetime_Call) RunAndReturn(run func(string, string, int) error) *mockConfigurationContext_SetWithLifetime_Call { - _c.Call.Return(run) - return _c -} - -// newMockConfigurationContext creates a new instance of mockConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockConfigurationContext(t interface { - mock.TestingT - Cleanup(func()) -}) *mockConfigurationContext { - mock := &mockConfigurationContext{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} From d775a0f14f3e3b9aba02dd981c6de8fe2f7467a5 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 15 Oct 2024 13:50:39 +0200 Subject: [PATCH 13/19] #31 Delete maintenance package and use version of maintenance module from k8s-registry-lib --- go.mod | 2 +- go.sum | 2 + main.go | 1 - pkg/backup/backupCreateManager.go | 8 +- pkg/backup/backupCreateManager_test.go | 55 +- pkg/backup/backupManager_test.go | 8 +- pkg/backup/interfaces.go | 18 +- pkg/backup/mock_MaintenanceModeSwitch_test.go | 56 +- .../mock_backupConfigMapInterface_test.go | 577 ++++++++++++ pkg/backup/mock_backupCoreV1Interface_test.go | 848 +++++++++++++++++ pkg/maintenance/interfaces.go | 37 - pkg/maintenance/looseCoupling.go | 29 - pkg/maintenance/looseCoupling_test.go | 56 -- pkg/maintenance/maintenance.go | 92 -- pkg/maintenance/maintenance_test.go | 97 -- .../mock_globalConfigRepository_test.go | 151 --- .../mock_maintenanceModeSwitch_test.go | 130 --- pkg/maintenance/mock_serviceInterface_test.go | 703 -------------- .../mock_statefulSetInterface_test.go | 882 ------------------ pkg/maintenance/mock_watcher_test.go | 114 --- pkg/restore/createManager.go | 9 +- pkg/restore/createManager_test.go | 35 +- pkg/restore/interfaces.go | 21 +- pkg/restore/manager.go | 3 +- pkg/restore/manager_test.go | 8 +- pkg/restore/mock_configMapInterface_test.go | 577 ++++++++++++ .../mock_maintenanceModeSwitch_test.go | 56 +- 27 files changed, 2164 insertions(+), 2411 deletions(-) create mode 100644 pkg/backup/mock_backupConfigMapInterface_test.go create mode 100644 pkg/backup/mock_backupCoreV1Interface_test.go delete mode 100644 pkg/maintenance/interfaces.go delete mode 100644 pkg/maintenance/looseCoupling.go delete mode 100644 pkg/maintenance/looseCoupling_test.go delete mode 100644 pkg/maintenance/maintenance.go delete mode 100644 pkg/maintenance/maintenance_test.go delete mode 100644 pkg/maintenance/mock_globalConfigRepository_test.go delete mode 100644 pkg/maintenance/mock_maintenanceModeSwitch_test.go delete mode 100644 pkg/maintenance/mock_serviceInterface_test.go delete mode 100644 pkg/maintenance/mock_statefulSetInterface_test.go delete mode 100644 pkg/maintenance/mock_watcher_test.go create mode 100644 pkg/restore/mock_configMapInterface_test.go diff --git a/go.mod b/go.mod index c0f6324..d4cb695 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ toolchain go1.23.1 require ( github.com/Masterminds/semver/v3 v3.3.0 github.com/cloudogu/cesapp-lib v0.14.0 - github.com/cloudogu/k8s-registry-lib v0.4.1 + github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085 github.com/dlclark/regexp2 v1.11.4 github.com/go-logr/logr v1.4.2 github.com/google/gnostic-models v0.6.8 diff --git a/go.sum b/go.sum index 5a46f22..bb14de5 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudogu/cesapp-lib v0.14.0 h1:955cU7ivgiSJGPJ36/YHhbrT0d7Km+7BwOITPrAJijo= github.com/cloudogu/cesapp-lib v0.14.0/go.mod h1:PTQqI3xs1ReJMXYE6BGTF33yAfmS4J7P8UiE4AwDMDY= +github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085 h1:geLHVzF/ln8QjYNNUC3QR/RVElI8/fdDMSFgEvrw8pQ= +github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= github.com/cloudogu/k8s-registry-lib v0.4.1 h1:V5fOMIYYH1XqwNQ0NjTWViD1G4R146KQVjIuCuPO5dc= github.com/cloudogu/k8s-registry-lib v0.4.1/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= diff --git a/main.go b/main.go index d246dbc..e00ef72 100644 --- a/main.go +++ b/main.go @@ -305,7 +305,6 @@ func configureReconcilers(ctx context.Context, k8sManager controllerManager, ope ecosystemClientSet, operatorConfig.Namespace, recorder, - globalConfig, cleanupManager, ) if err = (restore.NewRestoreReconciler(ecosystemClientSet, recorder, operatorConfig.Namespace, restoreManager, requeueHandler)).SetupWithManager(k8sManager); err != nil { diff --git a/pkg/backup/backupCreateManager.go b/pkg/backup/backupCreateManager.go index afa85ba..0a6fd41 100644 --- a/pkg/backup/backupCreateManager.go +++ b/pkg/backup/backupCreateManager.go @@ -9,7 +9,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" - "github.com/cloudogu/k8s-backup-operator/pkg/maintenance" + "github.com/cloudogu/k8s-registry-lib/repository" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/log" @@ -30,7 +30,7 @@ type backupCreateManager struct { // newBackupCreateManager creates a new instance of backupCreateManager. func newBackupCreateManager(clientSet ecosystemInterface, namespace string, recorder eventRecorder, globalConfigRepository globalConfigRepository) *backupCreateManager { - maintenanceModeSwitch := maintenance.New(globalConfigRepository) + maintenanceModeSwitch := repository.NewMaintenanceModeAdapter("k8s-backup-operator", clientSet.CoreV1().ConfigMaps(namespace)) return &backupCreateManager{clientSet: clientSet, namespace: namespace, globalConfigRepository: globalConfigRepository, recorder: recorder, maintenanceModeSwitch: maintenanceModeSwitch} } @@ -67,13 +67,13 @@ func (bcm *backupCreateManager) create(ctx context.Context, backup *v1.Backup) e return fmt.Errorf("failed to add labels to backup resource: %w", err) } - err = bcm.maintenanceModeSwitch.ActivateMaintenanceMode(ctx, maintenanceModeTitle, maintenanceModeText) + err = bcm.maintenanceModeSwitch.Activate(ctx, repository.MaintenanceModeDescription{Title: maintenanceModeTitle, Text: maintenanceModeText}) if err != nil { return fmt.Errorf("failed to active maintenance mode: %w", err) } defer func() { - errDefer := bcm.maintenanceModeSwitch.DeactivateMaintenanceMode(ctx) + errDefer := bcm.maintenanceModeSwitch.Deactivate(ctx) if errDefer != nil { logger.Error(fmt.Errorf("failed to deactivate maintenance mode: [%w]", errDefer), "backup error") } diff --git a/pkg/backup/backupCreateManager_test.go b/pkg/backup/backupCreateManager_test.go index 12995ae..a4ae48b 100644 --- a/pkg/backup/backupCreateManager_test.go +++ b/pkg/backup/backupCreateManager_test.go @@ -2,6 +2,8 @@ package backup import ( "context" + "github.com/cloudogu/k8s-registry-lib/repository" + "github.com/stretchr/testify/mock" "testing" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" @@ -20,9 +22,14 @@ func TestNewBackupCreateManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + configMapMock := newMockBackupConfigMapInterface(t) + corev1Client := newMockBackupCoreV1Interface(t) + corev1Client.EXPECT().ConfigMaps(mock.Anything).Return(configMapMock) + clientSetMock := newMockEcosystemInterface(t) + clientSetMock.EXPECT().CoreV1().Return(corev1Client) // when - manager := newBackupCreateManager(nil, "", nil, globalConfigRepositoryMock) + manager := newBackupCreateManager(clientSetMock, "", nil, globalConfigRepositoryMock) // then require.NotNil(t, manager) @@ -60,8 +67,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) @@ -107,8 +114,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) @@ -267,7 +274,7 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(assert.AnError) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(assert.AnError) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) @@ -305,8 +312,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -348,8 +355,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -394,8 +401,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -440,8 +447,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -486,8 +493,8 @@ func Test_backupCreateManager_create(t *testing.T) { }).Return(backup, nil) clientMock.EXPECT().UpdateStatusFailed(testCtx, backup).Return(nil, assert.AnError) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -534,8 +541,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(backup, nil) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(assert.AnError) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(assert.AnError) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -576,8 +583,8 @@ func Test_backupCreateManager_create(t *testing.T) { clientMock.EXPECT().UpdateStatusCompleted(testCtx, backup).Return(nil, nil) clientMock.EXPECT().Get(testCtx, backup.Name, metav1.GetOptions{}).Return(nil, assert.AnError) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -621,8 +628,8 @@ func Test_backupCreateManager_create(t *testing.T) { assert.NotEmpty(t, backup.Status.CompletionTimestamp) }).Return(nil, assert.AnError) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) @@ -666,8 +673,8 @@ func Test_backupCreateManager_create(t *testing.T) { }).Return(backup, nil) clientMock.EXPECT().UpdateStatusCompleted(testCtx, backup).Return(nil, assert.AnError) maintenanceModeMock := NewMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Backup in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Backup in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) v1Alpha1Client := newMockBackupV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Backups(testNamespace).Return(clientMock) clientSetMock := newMockEcosystemInterface(t) diff --git a/pkg/backup/backupManager_test.go b/pkg/backup/backupManager_test.go index 9e603dd..a3ab980 100644 --- a/pkg/backup/backupManager_test.go +++ b/pkg/backup/backupManager_test.go @@ -1,6 +1,7 @@ package backup import ( + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "testing" ) @@ -9,9 +10,14 @@ func TestNewBackupManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + configMapMock := newMockBackupConfigMapInterface(t) + corev1Client := newMockBackupCoreV1Interface(t) + corev1Client.EXPECT().ConfigMaps(mock.Anything).Return(configMapMock) + clientSetMock := newMockEcosystemInterface(t) + clientSetMock.EXPECT().CoreV1().Return(corev1Client) // when - manager := NewBackupManager(nil, testNamespace, nil, globalConfigRepositoryMock) + manager := NewBackupManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock) // then require.NotNil(t, manager) diff --git a/pkg/backup/interfaces.go b/pkg/backup/interfaces.go index d44c532..8a72084 100644 --- a/pkg/backup/interfaces.go +++ b/pkg/backup/interfaces.go @@ -6,6 +6,8 @@ import ( v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" "github.com/cloudogu/k8s-backup-operator/pkg/provider" "github.com/cloudogu/k8s-registry-lib/config" + "github.com/cloudogu/k8s-registry-lib/repository" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" ) @@ -27,8 +29,8 @@ type eventRecorder interface { } type MaintenanceModeSwitch interface { - ActivateMaintenanceMode(ctx context.Context, title string, text string) error - DeactivateMaintenanceMode(ctx context.Context) error + Activate(ctx context.Context, description repository.MaintenanceModeDescription) error + Deactivate(ctx context.Context) error } type backupControllerManager interface { @@ -61,6 +63,18 @@ type backupV1Alpha1Interface interface { ecosystem.V1Alpha1Interface } +//nolint:unused +//goland:noinspection GoUnusedType +type backupCoreV1Interface interface { + corev1.CoreV1Interface +} + +//nolint:unused +//goland:noinspection GoUnusedType +type backupConfigMapInterface interface { + corev1.ConfigMapInterface +} + //nolint:unused //goland:noinspection GoUnusedType type backupProvider interface { diff --git a/pkg/backup/mock_MaintenanceModeSwitch_test.go b/pkg/backup/mock_MaintenanceModeSwitch_test.go index 42aa2e9..41d514a 100644 --- a/pkg/backup/mock_MaintenanceModeSwitch_test.go +++ b/pkg/backup/mock_MaintenanceModeSwitch_test.go @@ -5,6 +5,7 @@ package backup import ( context "context" + repository "github.com/cloudogu/k8s-registry-lib/repository" mock "github.com/stretchr/testify/mock" ) @@ -21,17 +22,17 @@ func (_m *MockMaintenanceModeSwitch) EXPECT() *MockMaintenanceModeSwitch_Expecte return &MockMaintenanceModeSwitch_Expecter{mock: &_m.Mock} } -// ActivateMaintenanceMode provides a mock function with given fields: ctx, title, text -func (_m *MockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { - ret := _m.Called(ctx, title, text) +// Activate provides a mock function with given fields: ctx, description +func (_m *MockMaintenanceModeSwitch) Activate(ctx context.Context, description repository.MaintenanceModeDescription) error { + ret := _m.Called(ctx, description) if len(ret) == 0 { - panic("no return value specified for ActivateMaintenanceMode") + panic("no return value specified for Activate") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, title, text) + if rf, ok := ret.Get(0).(func(context.Context, repository.MaintenanceModeDescription) error); ok { + r0 = rf(ctx, description) } else { r0 = ret.Error(0) } @@ -39,42 +40,41 @@ func (_m *MockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context return r0 } -// MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ActivateMaintenanceMode' -type MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call struct { +// MockMaintenanceModeSwitch_Activate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Activate' +type MockMaintenanceModeSwitch_Activate_Call struct { *mock.Call } -// ActivateMaintenanceMode is a helper method to define mock.On call +// Activate is a helper method to define mock.On call // - ctx context.Context -// - title string -// - text string -func (_e *MockMaintenanceModeSwitch_Expecter) ActivateMaintenanceMode(ctx interface{}, title interface{}, text interface{}) *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { - return &MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call{Call: _e.mock.On("ActivateMaintenanceMode", ctx, title, text)} +// - description repository.MaintenanceModeDescription +func (_e *MockMaintenanceModeSwitch_Expecter) Activate(ctx interface{}, description interface{}) *MockMaintenanceModeSwitch_Activate_Call { + return &MockMaintenanceModeSwitch_Activate_Call{Call: _e.mock.On("Activate", ctx, description)} } -func (_c *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) Run(run func(ctx context.Context, title string, text string)) *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { +func (_c *MockMaintenanceModeSwitch_Activate_Call) Run(run func(ctx context.Context, description repository.MaintenanceModeDescription)) *MockMaintenanceModeSwitch_Activate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + run(args[0].(context.Context), args[1].(repository.MaintenanceModeDescription)) }) return _c } -func (_c *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) Return(_a0 error) *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { +func (_c *MockMaintenanceModeSwitch_Activate_Call) Return(_a0 error) *MockMaintenanceModeSwitch_Activate_Call { _c.Call.Return(_a0) return _c } -func (_c *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) RunAndReturn(run func(context.Context, string, string) error) *MockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { +func (_c *MockMaintenanceModeSwitch_Activate_Call) RunAndReturn(run func(context.Context, repository.MaintenanceModeDescription) error) *MockMaintenanceModeSwitch_Activate_Call { _c.Call.Return(run) return _c } -// DeactivateMaintenanceMode provides a mock function with given fields: ctx -func (_m *MockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Context) error { +// Deactivate provides a mock function with given fields: ctx +func (_m *MockMaintenanceModeSwitch) Deactivate(ctx context.Context) error { ret := _m.Called(ctx) if len(ret) == 0 { - panic("no return value specified for DeactivateMaintenanceMode") + panic("no return value specified for Deactivate") } var r0 error @@ -87,30 +87,30 @@ func (_m *MockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Conte return r0 } -// MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeactivateMaintenanceMode' -type MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call struct { +// MockMaintenanceModeSwitch_Deactivate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deactivate' +type MockMaintenanceModeSwitch_Deactivate_Call struct { *mock.Call } -// DeactivateMaintenanceMode is a helper method to define mock.On call +// Deactivate is a helper method to define mock.On call // - ctx context.Context -func (_e *MockMaintenanceModeSwitch_Expecter) DeactivateMaintenanceMode(ctx interface{}) *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { - return &MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call{Call: _e.mock.On("DeactivateMaintenanceMode", ctx)} +func (_e *MockMaintenanceModeSwitch_Expecter) Deactivate(ctx interface{}) *MockMaintenanceModeSwitch_Deactivate_Call { + return &MockMaintenanceModeSwitch_Deactivate_Call{Call: _e.mock.On("Deactivate", ctx)} } -func (_c *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) Run(run func(ctx context.Context)) *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { +func (_c *MockMaintenanceModeSwitch_Deactivate_Call) Run(run func(ctx context.Context)) *MockMaintenanceModeSwitch_Deactivate_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } -func (_c *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) Return(_a0 error) *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { +func (_c *MockMaintenanceModeSwitch_Deactivate_Call) Return(_a0 error) *MockMaintenanceModeSwitch_Deactivate_Call { _c.Call.Return(_a0) return _c } -func (_c *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) RunAndReturn(run func(context.Context) error) *MockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { +func (_c *MockMaintenanceModeSwitch_Deactivate_Call) RunAndReturn(run func(context.Context) error) *MockMaintenanceModeSwitch_Deactivate_Call { _c.Call.Return(run) return _c } diff --git a/pkg/backup/mock_backupConfigMapInterface_test.go b/pkg/backup/mock_backupConfigMapInterface_test.go new file mode 100644 index 0000000..cb8470a --- /dev/null +++ b/pkg/backup/mock_backupConfigMapInterface_test.go @@ -0,0 +1,577 @@ +// Code generated by mockery v2.42.1. DO NOT EDIT. + +package backup + +import ( + context "context" + + corev1 "k8s.io/api/core/v1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + mock "github.com/stretchr/testify/mock" + + types "k8s.io/apimachinery/pkg/types" + + v1 "k8s.io/client-go/applyconfigurations/core/v1" + + watch "k8s.io/apimachinery/pkg/watch" +) + +// mockBackupConfigMapInterface is an autogenerated mock type for the backupConfigMapInterface type +type mockBackupConfigMapInterface struct { + mock.Mock +} + +type mockBackupConfigMapInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *mockBackupConfigMapInterface) EXPECT() *mockBackupConfigMapInterface_Expecter { + return &mockBackupConfigMapInterface_Expecter{mock: &_m.Mock} +} + +// Apply provides a mock function with given fields: ctx, configMap, opts +func (_m *mockBackupConfigMapInterface) Apply(ctx context.Context, configMap *v1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, configMap, opts) + + if len(ret) == 0 { + panic("no return value specified for Apply") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, configMap, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, configMap, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) error); ok { + r1 = rf(ctx, configMap, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply' +type mockBackupConfigMapInterface_Apply_Call struct { + *mock.Call +} + +// Apply is a helper method to define mock.On call +// - ctx context.Context +// - configMap *v1.ConfigMapApplyConfiguration +// - opts metav1.ApplyOptions +func (_e *mockBackupConfigMapInterface_Expecter) Apply(ctx interface{}, configMap interface{}, opts interface{}) *mockBackupConfigMapInterface_Apply_Call { + return &mockBackupConfigMapInterface_Apply_Call{Call: _e.mock.On("Apply", ctx, configMap, opts)} +} + +func (_c *mockBackupConfigMapInterface_Apply_Call) Run(run func(ctx context.Context, configMap *v1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions)) *mockBackupConfigMapInterface_Apply_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1.ConfigMapApplyConfiguration), args[2].(metav1.ApplyOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Apply_Call) Return(result *corev1.ConfigMap, err error) *mockBackupConfigMapInterface_Apply_Call { + _c.Call.Return(result, err) + return _c +} + +func (_c *mockBackupConfigMapInterface_Apply_Call) RunAndReturn(run func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) (*corev1.ConfigMap, error)) *mockBackupConfigMapInterface_Apply_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx, configMap, opts +func (_m *mockBackupConfigMapInterface) Create(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.CreateOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, configMap, opts) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, configMap, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, configMap, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) error); ok { + r1 = rf(ctx, configMap, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type mockBackupConfigMapInterface_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - configMap *corev1.ConfigMap +// - opts metav1.CreateOptions +func (_e *mockBackupConfigMapInterface_Expecter) Create(ctx interface{}, configMap interface{}, opts interface{}) *mockBackupConfigMapInterface_Create_Call { + return &mockBackupConfigMapInterface_Create_Call{Call: _e.mock.On("Create", ctx, configMap, opts)} +} + +func (_c *mockBackupConfigMapInterface_Create_Call) Run(run func(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.CreateOptions)) *mockBackupConfigMapInterface_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*corev1.ConfigMap), args[2].(metav1.CreateOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Create_Call) Return(_a0 *corev1.ConfigMap, _a1 error) *mockBackupConfigMapInterface_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockBackupConfigMapInterface_Create_Call) RunAndReturn(run func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) (*corev1.ConfigMap, error)) *mockBackupConfigMapInterface_Create_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, name, opts +func (_m *mockBackupConfigMapInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + ret := _m.Called(ctx, name, opts) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { + r0 = rf(ctx, name, opts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockBackupConfigMapInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type mockBackupConfigMapInterface_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - opts metav1.DeleteOptions +func (_e *mockBackupConfigMapInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *mockBackupConfigMapInterface_Delete_Call { + return &mockBackupConfigMapInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)} +} + +func (_c *mockBackupConfigMapInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts metav1.DeleteOptions)) *mockBackupConfigMapInterface_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(metav1.DeleteOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Delete_Call) Return(_a0 error) *mockBackupConfigMapInterface_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupConfigMapInterface_Delete_Call) RunAndReturn(run func(context.Context, string, metav1.DeleteOptions) error) *mockBackupConfigMapInterface_Delete_Call { + _c.Call.Return(run) + return _c +} + +// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts +func (_m *mockBackupConfigMapInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + ret := _m.Called(ctx, opts, listOpts) + + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { + r0 = rf(ctx, opts, listOpts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockBackupConfigMapInterface_DeleteCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCollection' +type mockBackupConfigMapInterface_DeleteCollection_Call struct { + *mock.Call +} + +// DeleteCollection is a helper method to define mock.On call +// - ctx context.Context +// - opts metav1.DeleteOptions +// - listOpts metav1.ListOptions +func (_e *mockBackupConfigMapInterface_Expecter) DeleteCollection(ctx interface{}, opts interface{}, listOpts interface{}) *mockBackupConfigMapInterface_DeleteCollection_Call { + return &mockBackupConfigMapInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)} +} + +func (_c *mockBackupConfigMapInterface_DeleteCollection_Call) Run(run func(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions)) *mockBackupConfigMapInterface_DeleteCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metav1.DeleteOptions), args[2].(metav1.ListOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_DeleteCollection_Call) Return(_a0 error) *mockBackupConfigMapInterface_DeleteCollection_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupConfigMapInterface_DeleteCollection_Call) RunAndReturn(run func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error) *mockBackupConfigMapInterface_DeleteCollection_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, name, opts +func (_m *mockBackupConfigMapInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, name, opts) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, name, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, name, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok { + r1 = rf(ctx, name, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type mockBackupConfigMapInterface_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - opts metav1.GetOptions +func (_e *mockBackupConfigMapInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *mockBackupConfigMapInterface_Get_Call { + return &mockBackupConfigMapInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)} +} + +func (_c *mockBackupConfigMapInterface_Get_Call) Run(run func(ctx context.Context, name string, opts metav1.GetOptions)) *mockBackupConfigMapInterface_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(metav1.GetOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Get_Call) Return(_a0 *corev1.ConfigMap, _a1 error) *mockBackupConfigMapInterface_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockBackupConfigMapInterface_Get_Call) RunAndReturn(run func(context.Context, string, metav1.GetOptions) (*corev1.ConfigMap, error)) *mockBackupConfigMapInterface_Get_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, opts +func (_m *mockBackupConfigMapInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.ConfigMapList, error) { + ret := _m.Called(ctx, opts) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 *corev1.ConfigMapList + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*corev1.ConfigMapList, error)); ok { + return rf(ctx, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *corev1.ConfigMapList); ok { + r0 = rf(ctx, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMapList) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { + r1 = rf(ctx, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type mockBackupConfigMapInterface_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - opts metav1.ListOptions +func (_e *mockBackupConfigMapInterface_Expecter) List(ctx interface{}, opts interface{}) *mockBackupConfigMapInterface_List_Call { + return &mockBackupConfigMapInterface_List_Call{Call: _e.mock.On("List", ctx, opts)} +} + +func (_c *mockBackupConfigMapInterface_List_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockBackupConfigMapInterface_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metav1.ListOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_List_Call) Return(_a0 *corev1.ConfigMapList, _a1 error) *mockBackupConfigMapInterface_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockBackupConfigMapInterface_List_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (*corev1.ConfigMapList, error)) *mockBackupConfigMapInterface_List_Call { + _c.Call.Return(run) + return _c +} + +// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources +func (_m *mockBackupConfigMapInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*corev1.ConfigMap, error) { + _va := make([]interface{}, len(subresources)) + for _i := range subresources { + _va[_i] = subresources[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, name, pt, data, opts) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Patch") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.ConfigMap, error)); ok { + return rf(ctx, name, pt, data, opts, subresources...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *corev1.ConfigMap); ok { + r0 = rf(ctx, name, pt, data, opts, subresources...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) error); ok { + r1 = rf(ctx, name, pt, data, opts, subresources...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' +type mockBackupConfigMapInterface_Patch_Call struct { + *mock.Call +} + +// Patch is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - pt types.PatchType +// - data []byte +// - opts metav1.PatchOptions +// - subresources ...string +func (_e *mockBackupConfigMapInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *mockBackupConfigMapInterface_Patch_Call { + return &mockBackupConfigMapInterface_Patch_Call{Call: _e.mock.On("Patch", + append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)} +} + +func (_c *mockBackupConfigMapInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string)) *mockBackupConfigMapInterface_Patch_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]string, len(args)-5) + for i, a := range args[5:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(types.PatchType), args[3].([]byte), args[4].(metav1.PatchOptions), variadicArgs...) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Patch_Call) Return(result *corev1.ConfigMap, err error) *mockBackupConfigMapInterface_Patch_Call { + _c.Call.Return(result, err) + return _c +} + +func (_c *mockBackupConfigMapInterface_Patch_Call) RunAndReturn(run func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.ConfigMap, error)) *mockBackupConfigMapInterface_Patch_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, configMap, opts +func (_m *mockBackupConfigMapInterface) Update(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.UpdateOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, configMap, opts) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, configMap, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, configMap, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) error); ok { + r1 = rf(ctx, configMap, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type mockBackupConfigMapInterface_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - configMap *corev1.ConfigMap +// - opts metav1.UpdateOptions +func (_e *mockBackupConfigMapInterface_Expecter) Update(ctx interface{}, configMap interface{}, opts interface{}) *mockBackupConfigMapInterface_Update_Call { + return &mockBackupConfigMapInterface_Update_Call{Call: _e.mock.On("Update", ctx, configMap, opts)} +} + +func (_c *mockBackupConfigMapInterface_Update_Call) Run(run func(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.UpdateOptions)) *mockBackupConfigMapInterface_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*corev1.ConfigMap), args[2].(metav1.UpdateOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Update_Call) Return(_a0 *corev1.ConfigMap, _a1 error) *mockBackupConfigMapInterface_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockBackupConfigMapInterface_Update_Call) RunAndReturn(run func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) (*corev1.ConfigMap, error)) *mockBackupConfigMapInterface_Update_Call { + _c.Call.Return(run) + return _c +} + +// Watch provides a mock function with given fields: ctx, opts +func (_m *mockBackupConfigMapInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + ret := _m.Called(ctx, opts) + + if len(ret) == 0 { + panic("no return value specified for Watch") + } + + var r0 watch.Interface + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { + return rf(ctx, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) watch.Interface); ok { + r0 = rf(ctx, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(watch.Interface) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { + r1 = rf(ctx, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockBackupConfigMapInterface_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' +type mockBackupConfigMapInterface_Watch_Call struct { + *mock.Call +} + +// Watch is a helper method to define mock.On call +// - ctx context.Context +// - opts metav1.ListOptions +func (_e *mockBackupConfigMapInterface_Expecter) Watch(ctx interface{}, opts interface{}) *mockBackupConfigMapInterface_Watch_Call { + return &mockBackupConfigMapInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)} +} + +func (_c *mockBackupConfigMapInterface_Watch_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockBackupConfigMapInterface_Watch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metav1.ListOptions)) + }) + return _c +} + +func (_c *mockBackupConfigMapInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *mockBackupConfigMapInterface_Watch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockBackupConfigMapInterface_Watch_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (watch.Interface, error)) *mockBackupConfigMapInterface_Watch_Call { + _c.Call.Return(run) + return _c +} + +// newMockBackupConfigMapInterface creates a new instance of mockBackupConfigMapInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupConfigMapInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockBackupConfigMapInterface { + mock := &mockBackupConfigMapInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/backup/mock_backupCoreV1Interface_test.go b/pkg/backup/mock_backupCoreV1Interface_test.go new file mode 100644 index 0000000..ad9937f --- /dev/null +++ b/pkg/backup/mock_backupCoreV1Interface_test.go @@ -0,0 +1,848 @@ +// Code generated by mockery v2.42.1. DO NOT EDIT. + +package backup + +import ( + mock "github.com/stretchr/testify/mock" + rest "k8s.io/client-go/rest" + + v1 "k8s.io/client-go/kubernetes/typed/core/v1" +) + +// mockBackupCoreV1Interface is an autogenerated mock type for the backupCoreV1Interface type +type mockBackupCoreV1Interface struct { + mock.Mock +} + +type mockBackupCoreV1Interface_Expecter struct { + mock *mock.Mock +} + +func (_m *mockBackupCoreV1Interface) EXPECT() *mockBackupCoreV1Interface_Expecter { + return &mockBackupCoreV1Interface_Expecter{mock: &_m.Mock} +} + +// ComponentStatuses provides a mock function with given fields: +func (_m *mockBackupCoreV1Interface) ComponentStatuses() v1.ComponentStatusInterface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ComponentStatuses") + } + + var r0 v1.ComponentStatusInterface + if rf, ok := ret.Get(0).(func() v1.ComponentStatusInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ComponentStatusInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_ComponentStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ComponentStatuses' +type mockBackupCoreV1Interface_ComponentStatuses_Call struct { + *mock.Call +} + +// ComponentStatuses is a helper method to define mock.On call +func (_e *mockBackupCoreV1Interface_Expecter) ComponentStatuses() *mockBackupCoreV1Interface_ComponentStatuses_Call { + return &mockBackupCoreV1Interface_ComponentStatuses_Call{Call: _e.mock.On("ComponentStatuses")} +} + +func (_c *mockBackupCoreV1Interface_ComponentStatuses_Call) Run(run func()) *mockBackupCoreV1Interface_ComponentStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_ComponentStatuses_Call) Return(_a0 v1.ComponentStatusInterface) *mockBackupCoreV1Interface_ComponentStatuses_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_ComponentStatuses_Call) RunAndReturn(run func() v1.ComponentStatusInterface) *mockBackupCoreV1Interface_ComponentStatuses_Call { + _c.Call.Return(run) + return _c +} + +// ConfigMaps provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) ConfigMaps(namespace string) v1.ConfigMapInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for ConfigMaps") + } + + var r0 v1.ConfigMapInterface + if rf, ok := ret.Get(0).(func(string) v1.ConfigMapInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ConfigMapInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_ConfigMaps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigMaps' +type mockBackupCoreV1Interface_ConfigMaps_Call struct { + *mock.Call +} + +// ConfigMaps is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) ConfigMaps(namespace interface{}) *mockBackupCoreV1Interface_ConfigMaps_Call { + return &mockBackupCoreV1Interface_ConfigMaps_Call{Call: _e.mock.On("ConfigMaps", namespace)} +} + +func (_c *mockBackupCoreV1Interface_ConfigMaps_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_ConfigMaps_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_ConfigMaps_Call) Return(_a0 v1.ConfigMapInterface) *mockBackupCoreV1Interface_ConfigMaps_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_ConfigMaps_Call) RunAndReturn(run func(string) v1.ConfigMapInterface) *mockBackupCoreV1Interface_ConfigMaps_Call { + _c.Call.Return(run) + return _c +} + +// Endpoints provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) Endpoints(namespace string) v1.EndpointsInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for Endpoints") + } + + var r0 v1.EndpointsInterface + if rf, ok := ret.Get(0).(func(string) v1.EndpointsInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.EndpointsInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Endpoints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Endpoints' +type mockBackupCoreV1Interface_Endpoints_Call struct { + *mock.Call +} + +// Endpoints is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) Endpoints(namespace interface{}) *mockBackupCoreV1Interface_Endpoints_Call { + return &mockBackupCoreV1Interface_Endpoints_Call{Call: _e.mock.On("Endpoints", namespace)} +} + +func (_c *mockBackupCoreV1Interface_Endpoints_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_Endpoints_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Endpoints_Call) Return(_a0 v1.EndpointsInterface) *mockBackupCoreV1Interface_Endpoints_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Endpoints_Call) RunAndReturn(run func(string) v1.EndpointsInterface) *mockBackupCoreV1Interface_Endpoints_Call { + _c.Call.Return(run) + return _c +} + +// Events provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) Events(namespace string) v1.EventInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for Events") + } + + var r0 v1.EventInterface + if rf, ok := ret.Get(0).(func(string) v1.EventInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.EventInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events' +type mockBackupCoreV1Interface_Events_Call struct { + *mock.Call +} + +// Events is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) Events(namespace interface{}) *mockBackupCoreV1Interface_Events_Call { + return &mockBackupCoreV1Interface_Events_Call{Call: _e.mock.On("Events", namespace)} +} + +func (_c *mockBackupCoreV1Interface_Events_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_Events_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Events_Call) Return(_a0 v1.EventInterface) *mockBackupCoreV1Interface_Events_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Events_Call) RunAndReturn(run func(string) v1.EventInterface) *mockBackupCoreV1Interface_Events_Call { + _c.Call.Return(run) + return _c +} + +// LimitRanges provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) LimitRanges(namespace string) v1.LimitRangeInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for LimitRanges") + } + + var r0 v1.LimitRangeInterface + if rf, ok := ret.Get(0).(func(string) v1.LimitRangeInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.LimitRangeInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_LimitRanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitRanges' +type mockBackupCoreV1Interface_LimitRanges_Call struct { + *mock.Call +} + +// LimitRanges is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) LimitRanges(namespace interface{}) *mockBackupCoreV1Interface_LimitRanges_Call { + return &mockBackupCoreV1Interface_LimitRanges_Call{Call: _e.mock.On("LimitRanges", namespace)} +} + +func (_c *mockBackupCoreV1Interface_LimitRanges_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_LimitRanges_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_LimitRanges_Call) Return(_a0 v1.LimitRangeInterface) *mockBackupCoreV1Interface_LimitRanges_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_LimitRanges_Call) RunAndReturn(run func(string) v1.LimitRangeInterface) *mockBackupCoreV1Interface_LimitRanges_Call { + _c.Call.Return(run) + return _c +} + +// Namespaces provides a mock function with given fields: +func (_m *mockBackupCoreV1Interface) Namespaces() v1.NamespaceInterface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Namespaces") + } + + var r0 v1.NamespaceInterface + if rf, ok := ret.Get(0).(func() v1.NamespaceInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.NamespaceInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Namespaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Namespaces' +type mockBackupCoreV1Interface_Namespaces_Call struct { + *mock.Call +} + +// Namespaces is a helper method to define mock.On call +func (_e *mockBackupCoreV1Interface_Expecter) Namespaces() *mockBackupCoreV1Interface_Namespaces_Call { + return &mockBackupCoreV1Interface_Namespaces_Call{Call: _e.mock.On("Namespaces")} +} + +func (_c *mockBackupCoreV1Interface_Namespaces_Call) Run(run func()) *mockBackupCoreV1Interface_Namespaces_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Namespaces_Call) Return(_a0 v1.NamespaceInterface) *mockBackupCoreV1Interface_Namespaces_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Namespaces_Call) RunAndReturn(run func() v1.NamespaceInterface) *mockBackupCoreV1Interface_Namespaces_Call { + _c.Call.Return(run) + return _c +} + +// Nodes provides a mock function with given fields: +func (_m *mockBackupCoreV1Interface) Nodes() v1.NodeInterface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Nodes") + } + + var r0 v1.NodeInterface + if rf, ok := ret.Get(0).(func() v1.NodeInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.NodeInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Nodes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Nodes' +type mockBackupCoreV1Interface_Nodes_Call struct { + *mock.Call +} + +// Nodes is a helper method to define mock.On call +func (_e *mockBackupCoreV1Interface_Expecter) Nodes() *mockBackupCoreV1Interface_Nodes_Call { + return &mockBackupCoreV1Interface_Nodes_Call{Call: _e.mock.On("Nodes")} +} + +func (_c *mockBackupCoreV1Interface_Nodes_Call) Run(run func()) *mockBackupCoreV1Interface_Nodes_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Nodes_Call) Return(_a0 v1.NodeInterface) *mockBackupCoreV1Interface_Nodes_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Nodes_Call) RunAndReturn(run func() v1.NodeInterface) *mockBackupCoreV1Interface_Nodes_Call { + _c.Call.Return(run) + return _c +} + +// PersistentVolumeClaims provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) PersistentVolumeClaims(namespace string) v1.PersistentVolumeClaimInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for PersistentVolumeClaims") + } + + var r0 v1.PersistentVolumeClaimInterface + if rf, ok := ret.Get(0).(func(string) v1.PersistentVolumeClaimInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.PersistentVolumeClaimInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_PersistentVolumeClaims_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PersistentVolumeClaims' +type mockBackupCoreV1Interface_PersistentVolumeClaims_Call struct { + *mock.Call +} + +// PersistentVolumeClaims is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) PersistentVolumeClaims(namespace interface{}) *mockBackupCoreV1Interface_PersistentVolumeClaims_Call { + return &mockBackupCoreV1Interface_PersistentVolumeClaims_Call{Call: _e.mock.On("PersistentVolumeClaims", namespace)} +} + +func (_c *mockBackupCoreV1Interface_PersistentVolumeClaims_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_PersistentVolumeClaims_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_PersistentVolumeClaims_Call) Return(_a0 v1.PersistentVolumeClaimInterface) *mockBackupCoreV1Interface_PersistentVolumeClaims_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_PersistentVolumeClaims_Call) RunAndReturn(run func(string) v1.PersistentVolumeClaimInterface) *mockBackupCoreV1Interface_PersistentVolumeClaims_Call { + _c.Call.Return(run) + return _c +} + +// PersistentVolumes provides a mock function with given fields: +func (_m *mockBackupCoreV1Interface) PersistentVolumes() v1.PersistentVolumeInterface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for PersistentVolumes") + } + + var r0 v1.PersistentVolumeInterface + if rf, ok := ret.Get(0).(func() v1.PersistentVolumeInterface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.PersistentVolumeInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_PersistentVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PersistentVolumes' +type mockBackupCoreV1Interface_PersistentVolumes_Call struct { + *mock.Call +} + +// PersistentVolumes is a helper method to define mock.On call +func (_e *mockBackupCoreV1Interface_Expecter) PersistentVolumes() *mockBackupCoreV1Interface_PersistentVolumes_Call { + return &mockBackupCoreV1Interface_PersistentVolumes_Call{Call: _e.mock.On("PersistentVolumes")} +} + +func (_c *mockBackupCoreV1Interface_PersistentVolumes_Call) Run(run func()) *mockBackupCoreV1Interface_PersistentVolumes_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_PersistentVolumes_Call) Return(_a0 v1.PersistentVolumeInterface) *mockBackupCoreV1Interface_PersistentVolumes_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_PersistentVolumes_Call) RunAndReturn(run func() v1.PersistentVolumeInterface) *mockBackupCoreV1Interface_PersistentVolumes_Call { + _c.Call.Return(run) + return _c +} + +// PodTemplates provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) PodTemplates(namespace string) v1.PodTemplateInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for PodTemplates") + } + + var r0 v1.PodTemplateInterface + if rf, ok := ret.Get(0).(func(string) v1.PodTemplateInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.PodTemplateInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_PodTemplates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PodTemplates' +type mockBackupCoreV1Interface_PodTemplates_Call struct { + *mock.Call +} + +// PodTemplates is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) PodTemplates(namespace interface{}) *mockBackupCoreV1Interface_PodTemplates_Call { + return &mockBackupCoreV1Interface_PodTemplates_Call{Call: _e.mock.On("PodTemplates", namespace)} +} + +func (_c *mockBackupCoreV1Interface_PodTemplates_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_PodTemplates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_PodTemplates_Call) Return(_a0 v1.PodTemplateInterface) *mockBackupCoreV1Interface_PodTemplates_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_PodTemplates_Call) RunAndReturn(run func(string) v1.PodTemplateInterface) *mockBackupCoreV1Interface_PodTemplates_Call { + _c.Call.Return(run) + return _c +} + +// Pods provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) Pods(namespace string) v1.PodInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for Pods") + } + + var r0 v1.PodInterface + if rf, ok := ret.Get(0).(func(string) v1.PodInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.PodInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Pods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pods' +type mockBackupCoreV1Interface_Pods_Call struct { + *mock.Call +} + +// Pods is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) Pods(namespace interface{}) *mockBackupCoreV1Interface_Pods_Call { + return &mockBackupCoreV1Interface_Pods_Call{Call: _e.mock.On("Pods", namespace)} +} + +func (_c *mockBackupCoreV1Interface_Pods_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_Pods_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Pods_Call) Return(_a0 v1.PodInterface) *mockBackupCoreV1Interface_Pods_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Pods_Call) RunAndReturn(run func(string) v1.PodInterface) *mockBackupCoreV1Interface_Pods_Call { + _c.Call.Return(run) + return _c +} + +// RESTClient provides a mock function with given fields: +func (_m *mockBackupCoreV1Interface) RESTClient() rest.Interface { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for RESTClient") + } + + var r0 rest.Interface + if rf, ok := ret.Get(0).(func() rest.Interface); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(rest.Interface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_RESTClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RESTClient' +type mockBackupCoreV1Interface_RESTClient_Call struct { + *mock.Call +} + +// RESTClient is a helper method to define mock.On call +func (_e *mockBackupCoreV1Interface_Expecter) RESTClient() *mockBackupCoreV1Interface_RESTClient_Call { + return &mockBackupCoreV1Interface_RESTClient_Call{Call: _e.mock.On("RESTClient")} +} + +func (_c *mockBackupCoreV1Interface_RESTClient_Call) Run(run func()) *mockBackupCoreV1Interface_RESTClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_RESTClient_Call) Return(_a0 rest.Interface) *mockBackupCoreV1Interface_RESTClient_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_RESTClient_Call) RunAndReturn(run func() rest.Interface) *mockBackupCoreV1Interface_RESTClient_Call { + _c.Call.Return(run) + return _c +} + +// ReplicationControllers provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) ReplicationControllers(namespace string) v1.ReplicationControllerInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for ReplicationControllers") + } + + var r0 v1.ReplicationControllerInterface + if rf, ok := ret.Get(0).(func(string) v1.ReplicationControllerInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ReplicationControllerInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_ReplicationControllers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationControllers' +type mockBackupCoreV1Interface_ReplicationControllers_Call struct { + *mock.Call +} + +// ReplicationControllers is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) ReplicationControllers(namespace interface{}) *mockBackupCoreV1Interface_ReplicationControllers_Call { + return &mockBackupCoreV1Interface_ReplicationControllers_Call{Call: _e.mock.On("ReplicationControllers", namespace)} +} + +func (_c *mockBackupCoreV1Interface_ReplicationControllers_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_ReplicationControllers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_ReplicationControllers_Call) Return(_a0 v1.ReplicationControllerInterface) *mockBackupCoreV1Interface_ReplicationControllers_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_ReplicationControllers_Call) RunAndReturn(run func(string) v1.ReplicationControllerInterface) *mockBackupCoreV1Interface_ReplicationControllers_Call { + _c.Call.Return(run) + return _c +} + +// ResourceQuotas provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) ResourceQuotas(namespace string) v1.ResourceQuotaInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for ResourceQuotas") + } + + var r0 v1.ResourceQuotaInterface + if rf, ok := ret.Get(0).(func(string) v1.ResourceQuotaInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ResourceQuotaInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_ResourceQuotas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResourceQuotas' +type mockBackupCoreV1Interface_ResourceQuotas_Call struct { + *mock.Call +} + +// ResourceQuotas is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) ResourceQuotas(namespace interface{}) *mockBackupCoreV1Interface_ResourceQuotas_Call { + return &mockBackupCoreV1Interface_ResourceQuotas_Call{Call: _e.mock.On("ResourceQuotas", namespace)} +} + +func (_c *mockBackupCoreV1Interface_ResourceQuotas_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_ResourceQuotas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_ResourceQuotas_Call) Return(_a0 v1.ResourceQuotaInterface) *mockBackupCoreV1Interface_ResourceQuotas_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_ResourceQuotas_Call) RunAndReturn(run func(string) v1.ResourceQuotaInterface) *mockBackupCoreV1Interface_ResourceQuotas_Call { + _c.Call.Return(run) + return _c +} + +// Secrets provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) Secrets(namespace string) v1.SecretInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for Secrets") + } + + var r0 v1.SecretInterface + if rf, ok := ret.Get(0).(func(string) v1.SecretInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.SecretInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Secrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Secrets' +type mockBackupCoreV1Interface_Secrets_Call struct { + *mock.Call +} + +// Secrets is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) Secrets(namespace interface{}) *mockBackupCoreV1Interface_Secrets_Call { + return &mockBackupCoreV1Interface_Secrets_Call{Call: _e.mock.On("Secrets", namespace)} +} + +func (_c *mockBackupCoreV1Interface_Secrets_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_Secrets_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Secrets_Call) Return(_a0 v1.SecretInterface) *mockBackupCoreV1Interface_Secrets_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Secrets_Call) RunAndReturn(run func(string) v1.SecretInterface) *mockBackupCoreV1Interface_Secrets_Call { + _c.Call.Return(run) + return _c +} + +// ServiceAccounts provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) ServiceAccounts(namespace string) v1.ServiceAccountInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for ServiceAccounts") + } + + var r0 v1.ServiceAccountInterface + if rf, ok := ret.Get(0).(func(string) v1.ServiceAccountInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ServiceAccountInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_ServiceAccounts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServiceAccounts' +type mockBackupCoreV1Interface_ServiceAccounts_Call struct { + *mock.Call +} + +// ServiceAccounts is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) ServiceAccounts(namespace interface{}) *mockBackupCoreV1Interface_ServiceAccounts_Call { + return &mockBackupCoreV1Interface_ServiceAccounts_Call{Call: _e.mock.On("ServiceAccounts", namespace)} +} + +func (_c *mockBackupCoreV1Interface_ServiceAccounts_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_ServiceAccounts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_ServiceAccounts_Call) Return(_a0 v1.ServiceAccountInterface) *mockBackupCoreV1Interface_ServiceAccounts_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_ServiceAccounts_Call) RunAndReturn(run func(string) v1.ServiceAccountInterface) *mockBackupCoreV1Interface_ServiceAccounts_Call { + _c.Call.Return(run) + return _c +} + +// Services provides a mock function with given fields: namespace +func (_m *mockBackupCoreV1Interface) Services(namespace string) v1.ServiceInterface { + ret := _m.Called(namespace) + + if len(ret) == 0 { + panic("no return value specified for Services") + } + + var r0 v1.ServiceInterface + if rf, ok := ret.Get(0).(func(string) v1.ServiceInterface); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(v1.ServiceInterface) + } + } + + return r0 +} + +// mockBackupCoreV1Interface_Services_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Services' +type mockBackupCoreV1Interface_Services_Call struct { + *mock.Call +} + +// Services is a helper method to define mock.On call +// - namespace string +func (_e *mockBackupCoreV1Interface_Expecter) Services(namespace interface{}) *mockBackupCoreV1Interface_Services_Call { + return &mockBackupCoreV1Interface_Services_Call{Call: _e.mock.On("Services", namespace)} +} + +func (_c *mockBackupCoreV1Interface_Services_Call) Run(run func(namespace string)) *mockBackupCoreV1Interface_Services_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *mockBackupCoreV1Interface_Services_Call) Return(_a0 v1.ServiceInterface) *mockBackupCoreV1Interface_Services_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockBackupCoreV1Interface_Services_Call) RunAndReturn(run func(string) v1.ServiceInterface) *mockBackupCoreV1Interface_Services_Call { + _c.Call.Return(run) + return _c +} + +// newMockBackupCoreV1Interface creates a new instance of mockBackupCoreV1Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupCoreV1Interface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockBackupCoreV1Interface { + mock := &mockBackupCoreV1Interface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/maintenance/interfaces.go b/pkg/maintenance/interfaces.go deleted file mode 100644 index c1d4679..0000000 --- a/pkg/maintenance/interfaces.go +++ /dev/null @@ -1,37 +0,0 @@ -package maintenance - -import ( - "context" - "github.com/cloudogu/k8s-registry-lib/config" - "k8s.io/apimachinery/pkg/watch" - appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" - corev1 "k8s.io/client-go/kubernetes/typed/core/v1" -) - -type maintenanceModeSwitch interface { - // ActivateMaintenanceMode activates the maintenance mode. - ActivateMaintenanceMode(ctx context.Context, title string, text string) error - // DeactivateMaintenanceMode deactivates the maintenance mode. - DeactivateMaintenanceMode(ctx context.Context) error -} - -type statefulSetInterface interface { - appsv1.StatefulSetInterface -} - -type serviceInterface interface { - corev1.ServiceInterface -} - -// used for mocks - -//nolint:unused -//goland:noinspection GoUnusedType -type watcher interface { - watch.Interface -} - -type globalConfigRepository interface { - Get(ctx context.Context) (config.GlobalConfig, error) - Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) -} diff --git a/pkg/maintenance/looseCoupling.go b/pkg/maintenance/looseCoupling.go deleted file mode 100644 index accaf81..0000000 --- a/pkg/maintenance/looseCoupling.go +++ /dev/null @@ -1,29 +0,0 @@ -package maintenance - -import ( - "context" -) - -type looselyCoupledMaintenanceSwitch struct { - maintenanceModeSwitch -} - -// NewWithLooseCoupling creates a switch that checks if the configuration registry exists before switching. -// If the registry does not exist, no switch is executed. -func NewWithLooseCoupling(globalConfigRepository globalConfigRepository) *looselyCoupledMaintenanceSwitch { - return &looselyCoupledMaintenanceSwitch{ - maintenanceModeSwitch: New(globalConfigRepository), - } -} - -// ActivateMaintenanceMode activates the maintenance mode if the global registry exists and is ready. -// This loose coupling enables us to perform restores on an empty cluster. -func (lcms *looselyCoupledMaintenanceSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { - return lcms.maintenanceModeSwitch.ActivateMaintenanceMode(ctx, title, text) -} - -// DeactivateMaintenanceMode waits until the global registry is ready and then deactivates the maintenance mode. -// While this is not directly loose coupling, we trust that an instance of the global registry will be restored. -func (lcms *looselyCoupledMaintenanceSwitch) DeactivateMaintenanceMode(ctx context.Context) error { - return lcms.maintenanceModeSwitch.DeactivateMaintenanceMode(ctx) -} diff --git a/pkg/maintenance/looseCoupling_test.go b/pkg/maintenance/looseCoupling_test.go deleted file mode 100644 index 60f8b39..0000000 --- a/pkg/maintenance/looseCoupling_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package maintenance - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -var testCtx = context.TODO() - -func TestNewWithLooseCoupling(t *testing.T) { - // when - actual := NewWithLooseCoupling(nil) - - // then - require.NotEmpty(t, actual) -} - -func Test_looselyCoupledMaintenanceSwitch_ActivateMaintenanceMode(t *testing.T) { - t.Run("should fail if activating the maintenance mode fails", func(t *testing.T) { - // given - maintenance := newMockMaintenanceModeSwitch(t) - maintenance.EXPECT().ActivateMaintenanceMode(testCtx, "title", "text").Return(assert.AnError) - - sut := &looselyCoupledMaintenanceSwitch{ - maintenanceModeSwitch: maintenance, - } - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.Error(t, err) - assert.ErrorIs(t, err, assert.AnError) - }) -} - -func Test_looselyCoupledMaintenanceSwitch_DeactivateMaintenanceMode(t *testing.T) { - t.Run("should fail if deactivating maintenance fails", func(t *testing.T) { - // given - maintenance := newMockMaintenanceModeSwitch(t) - maintenance.EXPECT().DeactivateMaintenanceMode(testCtx).Return(assert.AnError) - - sut := &looselyCoupledMaintenanceSwitch{ - maintenanceModeSwitch: maintenance, - } - - // when - err := sut.DeactivateMaintenanceMode(testCtx) - - // then - require.Error(t, err) - assert.ErrorIs(t, err, assert.AnError) - }) -} diff --git a/pkg/maintenance/maintenance.go b/pkg/maintenance/maintenance.go deleted file mode 100644 index e32b1a5..0000000 --- a/pkg/maintenance/maintenance.go +++ /dev/null @@ -1,92 +0,0 @@ -package maintenance - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/cloudogu/k8s-backup-operator/pkg/requeue" - "github.com/cloudogu/k8s-registry-lib/config" -) - -const registryKeyMaintenance = "maintenance" - -type maintenanceSwitch struct { - globalConfigRepository globalConfigRepository -} - -type maintenanceRegistryObject struct { - Title string `json:"title,omitempty"` - Text string `json:"text,omitempty"` -} - -// New create a new instance of maintenanceSwitch. -func New(globalConfigRepository globalConfigRepository) *maintenanceSwitch { - return &maintenanceSwitch{globalConfigRepository: globalConfigRepository} -} - -// ActivateMaintenanceMode activates the maintenance mode with given title and text by writing in the global config. -func (ms *maintenanceSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { - isActive, err := ms.isActive(ctx) - if err != nil { - return err - } - - if isActive { - return &requeue.GenericRequeueableError{ - ErrMsg: "maybe currently other critical processes running: requeue", - Err: fmt.Errorf("error: maintenance mode is active but should be inactive"), - } - } - - return ms.activate(ctx, title, text) -} - -// DeactivateMaintenanceMode deactivates the maintenance mode by deleting the maintenance key in the global config. -func (ms *maintenanceSwitch) DeactivateMaintenanceMode(ctx context.Context) error { - globalConfig, err := ms.globalConfigRepository.Get(ctx) - if err != nil { - return fmt.Errorf("failed to get global config: %w", err) - } - cfg := globalConfig.Delete(registryKeyMaintenance) - _, err = ms.globalConfigRepository.Update(ctx, config.GlobalConfig{ - Config: cfg, - }) - return err -} - -func (ms *maintenanceSwitch) isActive(ctx context.Context) (bool, error) { - globalConfig, err := ms.globalConfigRepository.Get(ctx) - if err != nil { - return false, fmt.Errorf("failed to get global config: %w", err) - } - - _, exists := globalConfig.Get(registryKeyMaintenance) - - return exists, nil -} - -func (ms *maintenanceSwitch) activate(ctx context.Context, title, text string) error { - value := maintenanceRegistryObject{ - Title: title, - Text: text, - } - - marshal, err := json.Marshal(value) - if err != nil { - return fmt.Errorf("failed to marshal maintenance globalConfig value object [%+v]: %w", value, err) - } - - globalConfig, err := ms.globalConfigRepository.Get(ctx) - if err != nil { - return fmt.Errorf("failed to get global config: %w", err) - } - cfg, err := globalConfig.Set(registryKeyMaintenance, config.Value(marshal)) - if err != nil { - return fmt.Errorf("failed to set global config: %w", err) - } - _, err = ms.globalConfigRepository.Update(ctx, config.GlobalConfig{ - Config: cfg, - }) - return err -} diff --git a/pkg/maintenance/maintenance_test.go b/pkg/maintenance/maintenance_test.go deleted file mode 100644 index 335b8bd..0000000 --- a/pkg/maintenance/maintenance_test.go +++ /dev/null @@ -1,97 +0,0 @@ -package maintenance - -import ( - "github.com/cloudogu/k8s-backup-operator/pkg/requeue" - "github.com/cloudogu/k8s-registry-lib/config" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "testing" -) - -func TestNew(t *testing.T) { - t.Run("success", func(t *testing.T) { - // when - result := New(nil) - - // then - require.NotNil(t, result) - }) -} - -func Test_maintenanceSwitch_ActivateMaintenanceMode(t *testing.T) { - t.Run("success", func(t *testing.T) { - // given - globalConfigRepositoryMock := newMockGlobalConfigRepository(t) - cfgPrev := config.CreateConfig(make(config.Entries)) - gCfg := config.GlobalConfig{Config: cfgPrev} - cfgAfter := config.CreateConfig(make(config.Entries)) - _, err := cfgAfter.Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}") - assert.NoError(t, err) - gCfgExpected := config.GlobalConfig{Config: cfgAfter} - globalConfigRepositoryMock.EXPECT().Get(mock.Anything).Return(gCfg, nil) - globalConfigRepositoryMock.EXPECT().Update(mock.Anything, mock.Anything).Return(gCfgExpected, nil) - - sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} - - // when - err = sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.NoError(t, err) - }) - - t.Run("should return error on failing exists", func(t *testing.T) { - // given - globalConfigRepositoryMock := newMockGlobalConfigRepository(t) - cfgPrev := config.CreateConfig(make(config.Entries)) - globalConfigRepositoryMock.EXPECT().Get(testCtx).Return(config.GlobalConfig{cfgPrev}, assert.AnError) - sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} - - // when - err := sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.Error(t, err) - assert.ErrorContains(t, err, "failed to get global config") - assert.ErrorIs(t, err, assert.AnError) - }) - - t.Run("should return a requeueable error is the maintenance mode is active before activation", func(t *testing.T) { - // given - globalConfigRepositoryMock := newMockGlobalConfigRepository(t) - cfgAfter := config.CreateConfig(make(config.Entries)) - _, err := cfgAfter.Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}") - assert.NoError(t, err) - gCfgExpected := config.GlobalConfig{Config: cfgAfter} - globalConfigRepositoryMock.EXPECT().Get(testCtx).Return(gCfgExpected, nil) - sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} - - // when - err = sut.ActivateMaintenanceMode(testCtx, "title", "text") - - // then - require.Error(t, err) - assert.ErrorContains(t, err, "maybe currently other critical processes running: requeue: error: maintenance mode is active but should be inactive") - assert.IsType(t, &requeue.GenericRequeueableError{}, err) - }) -} - -func Test_maintenanceSwitch_DeactivateMaintenanceMode(t *testing.T) { - t.Run("success", func(t *testing.T) { - // given - globalConfigRepositoryMock := newMockGlobalConfigRepository(t) - cfgPrev := config.CreateConfig(make(config.Entries)) - _, err := cfgPrev.Set("maintenance", "{\"title\":\"title\",\"text\":\"text\"}") - cfgAfter := config.CreateConfig(make(config.Entries)) - globalConfigRepositoryMock.EXPECT().Get(testCtx).Return(config.GlobalConfig{Config: cfgPrev}, nil) - globalConfigRepositoryMock.EXPECT().Update(testCtx, mock.Anything).Return(config.GlobalConfig{Config: cfgAfter}, nil) - sut := maintenanceSwitch{globalConfigRepository: globalConfigRepositoryMock} - - // when - err = sut.DeactivateMaintenanceMode(testCtx) - - // then - require.NoError(t, err) - }) -} diff --git a/pkg/maintenance/mock_globalConfigRepository_test.go b/pkg/maintenance/mock_globalConfigRepository_test.go deleted file mode 100644 index 8f7e327..0000000 --- a/pkg/maintenance/mock_globalConfigRepository_test.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package maintenance - -import ( - context "context" - - config "github.com/cloudogu/k8s-registry-lib/config" - - mock "github.com/stretchr/testify/mock" -) - -// mockGlobalConfigRepository is an autogenerated mock type for the globalConfigRepository type -type mockGlobalConfigRepository struct { - mock.Mock -} - -type mockGlobalConfigRepository_Expecter struct { - mock *mock.Mock -} - -func (_m *mockGlobalConfigRepository) EXPECT() *mockGlobalConfigRepository_Expecter { - return &mockGlobalConfigRepository_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx -func (_m *mockGlobalConfigRepository) Get(ctx context.Context) (config.GlobalConfig, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 config.GlobalConfig - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (config.GlobalConfig, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) config.GlobalConfig); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(config.GlobalConfig) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfigRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockGlobalConfigRepository_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -func (_e *mockGlobalConfigRepository_Expecter) Get(ctx interface{}) *mockGlobalConfigRepository_Get_Call { - return &mockGlobalConfigRepository_Get_Call{Call: _e.mock.On("Get", ctx)} -} - -func (_c *mockGlobalConfigRepository_Get_Call) Run(run func(ctx context.Context)) *mockGlobalConfigRepository_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *mockGlobalConfigRepository_Get_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfigRepository_Get_Call) RunAndReturn(run func(context.Context) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, globalConfig -func (_m *mockGlobalConfigRepository) Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) { - ret := _m.Called(ctx, globalConfig) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 config.GlobalConfig - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)); ok { - return rf(ctx, globalConfig) - } - if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) config.GlobalConfig); ok { - r0 = rf(ctx, globalConfig) - } else { - r0 = ret.Get(0).(config.GlobalConfig) - } - - if rf, ok := ret.Get(1).(func(context.Context, config.GlobalConfig) error); ok { - r1 = rf(ctx, globalConfig) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfigRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type mockGlobalConfigRepository_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - globalConfig config.GlobalConfig -func (_e *mockGlobalConfigRepository_Expecter) Update(ctx interface{}, globalConfig interface{}) *mockGlobalConfigRepository_Update_Call { - return &mockGlobalConfigRepository_Update_Call{Call: _e.mock.On("Update", ctx, globalConfig)} -} - -func (_c *mockGlobalConfigRepository_Update_Call) Run(run func(ctx context.Context, globalConfig config.GlobalConfig)) *mockGlobalConfigRepository_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(config.GlobalConfig)) - }) - return _c -} - -func (_c *mockGlobalConfigRepository_Update_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfigRepository_Update_Call) RunAndReturn(run func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Update_Call { - _c.Call.Return(run) - return _c -} - -// newMockGlobalConfigRepository creates a new instance of mockGlobalConfigRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGlobalConfigRepository(t interface { - mock.TestingT - Cleanup(func()) -}) *mockGlobalConfigRepository { - mock := &mockGlobalConfigRepository{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/maintenance/mock_maintenanceModeSwitch_test.go b/pkg/maintenance/mock_maintenanceModeSwitch_test.go deleted file mode 100644 index 13ad71c..0000000 --- a/pkg/maintenance/mock_maintenanceModeSwitch_test.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package maintenance - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockMaintenanceModeSwitch is an autogenerated mock type for the maintenanceModeSwitch type -type mockMaintenanceModeSwitch struct { - mock.Mock -} - -type mockMaintenanceModeSwitch_Expecter struct { - mock *mock.Mock -} - -func (_m *mockMaintenanceModeSwitch) EXPECT() *mockMaintenanceModeSwitch_Expecter { - return &mockMaintenanceModeSwitch_Expecter{mock: &_m.Mock} -} - -// ActivateMaintenanceMode provides a mock function with given fields: ctx, title, text -func (_m *mockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { - ret := _m.Called(ctx, title, text) - - if len(ret) == 0 { - panic("no return value specified for ActivateMaintenanceMode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, title, text) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ActivateMaintenanceMode' -type mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call struct { - *mock.Call -} - -// ActivateMaintenanceMode is a helper method to define mock.On call -// - ctx context.Context -// - title string -// - text string -func (_e *mockMaintenanceModeSwitch_Expecter) ActivateMaintenanceMode(ctx interface{}, title interface{}, text interface{}) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { - return &mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call{Call: _e.mock.On("ActivateMaintenanceMode", ctx, title, text)} -} - -func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) Run(run func(ctx context.Context, title string, text string)) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) Return(_a0 error) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) RunAndReturn(run func(context.Context, string, string) error) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { - _c.Call.Return(run) - return _c -} - -// DeactivateMaintenanceMode provides a mock function with given fields: ctx -func (_m *mockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for DeactivateMaintenanceMode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeactivateMaintenanceMode' -type mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call struct { - *mock.Call -} - -// DeactivateMaintenanceMode is a helper method to define mock.On call -// - ctx context.Context -func (_e *mockMaintenanceModeSwitch_Expecter) DeactivateMaintenanceMode(ctx interface{}) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { - return &mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call{Call: _e.mock.On("DeactivateMaintenanceMode", ctx)} -} - -func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) Run(run func(ctx context.Context)) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) Return(_a0 error) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) RunAndReturn(run func(context.Context) error) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { - _c.Call.Return(run) - return _c -} - -// newMockMaintenanceModeSwitch creates a new instance of mockMaintenanceModeSwitch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockMaintenanceModeSwitch(t interface { - mock.TestingT - Cleanup(func()) -}) *mockMaintenanceModeSwitch { - mock := &mockMaintenanceModeSwitch{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/maintenance/mock_serviceInterface_test.go b/pkg/maintenance/mock_serviceInterface_test.go deleted file mode 100644 index c885929..0000000 --- a/pkg/maintenance/mock_serviceInterface_test.go +++ /dev/null @@ -1,703 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package maintenance - -import ( - context "context" - - corev1 "k8s.io/api/core/v1" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - mock "github.com/stretchr/testify/mock" - - rest "k8s.io/client-go/rest" - - types "k8s.io/apimachinery/pkg/types" - - v1 "k8s.io/client-go/applyconfigurations/core/v1" - - watch "k8s.io/apimachinery/pkg/watch" -) - -// mockServiceInterface is an autogenerated mock type for the serviceInterface type -type mockServiceInterface struct { - mock.Mock -} - -type mockServiceInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *mockServiceInterface) EXPECT() *mockServiceInterface_Expecter { - return &mockServiceInterface_Expecter{mock: &_m.Mock} -} - -// Apply provides a mock function with given fields: ctx, service, opts -func (_m *mockServiceInterface) Apply(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Service, error) { - ret := _m.Called(ctx, service, opts) - - if len(ret) == 0 { - panic("no return value specified for Apply") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)); ok { - return rf(ctx, service, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) *corev1.Service); ok { - r0 = rf(ctx, service, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) error); ok { - r1 = rf(ctx, service, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply' -type mockServiceInterface_Apply_Call struct { - *mock.Call -} - -// Apply is a helper method to define mock.On call -// - ctx context.Context -// - service *v1.ServiceApplyConfiguration -// - opts metav1.ApplyOptions -func (_e *mockServiceInterface_Expecter) Apply(ctx interface{}, service interface{}, opts interface{}) *mockServiceInterface_Apply_Call { - return &mockServiceInterface_Apply_Call{Call: _e.mock.On("Apply", ctx, service, opts)} -} - -func (_c *mockServiceInterface_Apply_Call) Run(run func(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions)) *mockServiceInterface_Apply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.ServiceApplyConfiguration), args[2].(metav1.ApplyOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_Apply_Call) Return(result *corev1.Service, err error) *mockServiceInterface_Apply_Call { - _c.Call.Return(result, err) - return _c -} - -func (_c *mockServiceInterface_Apply_Call) RunAndReturn(run func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)) *mockServiceInterface_Apply_Call { - _c.Call.Return(run) - return _c -} - -// ApplyStatus provides a mock function with given fields: ctx, service, opts -func (_m *mockServiceInterface) ApplyStatus(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions) (*corev1.Service, error) { - ret := _m.Called(ctx, service, opts) - - if len(ret) == 0 { - panic("no return value specified for ApplyStatus") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)); ok { - return rf(ctx, service, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) *corev1.Service); ok { - r0 = rf(ctx, service, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) error); ok { - r1 = rf(ctx, service, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_ApplyStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyStatus' -type mockServiceInterface_ApplyStatus_Call struct { - *mock.Call -} - -// ApplyStatus is a helper method to define mock.On call -// - ctx context.Context -// - service *v1.ServiceApplyConfiguration -// - opts metav1.ApplyOptions -func (_e *mockServiceInterface_Expecter) ApplyStatus(ctx interface{}, service interface{}, opts interface{}) *mockServiceInterface_ApplyStatus_Call { - return &mockServiceInterface_ApplyStatus_Call{Call: _e.mock.On("ApplyStatus", ctx, service, opts)} -} - -func (_c *mockServiceInterface_ApplyStatus_Call) Run(run func(ctx context.Context, service *v1.ServiceApplyConfiguration, opts metav1.ApplyOptions)) *mockServiceInterface_ApplyStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.ServiceApplyConfiguration), args[2].(metav1.ApplyOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_ApplyStatus_Call) Return(result *corev1.Service, err error) *mockServiceInterface_ApplyStatus_Call { - _c.Call.Return(result, err) - return _c -} - -func (_c *mockServiceInterface_ApplyStatus_Call) RunAndReturn(run func(context.Context, *v1.ServiceApplyConfiguration, metav1.ApplyOptions) (*corev1.Service, error)) *mockServiceInterface_ApplyStatus_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, service, opts -func (_m *mockServiceInterface) Create(ctx context.Context, service *corev1.Service, opts metav1.CreateOptions) (*corev1.Service, error) { - ret := _m.Called(ctx, service, opts) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.CreateOptions) (*corev1.Service, error)); ok { - return rf(ctx, service, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.CreateOptions) *corev1.Service); ok { - r0 = rf(ctx, service, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *corev1.Service, metav1.CreateOptions) error); ok { - r1 = rf(ctx, service, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type mockServiceInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - service *corev1.Service -// - opts metav1.CreateOptions -func (_e *mockServiceInterface_Expecter) Create(ctx interface{}, service interface{}, opts interface{}) *mockServiceInterface_Create_Call { - return &mockServiceInterface_Create_Call{Call: _e.mock.On("Create", ctx, service, opts)} -} - -func (_c *mockServiceInterface_Create_Call) Run(run func(ctx context.Context, service *corev1.Service, opts metav1.CreateOptions)) *mockServiceInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*corev1.Service), args[2].(metav1.CreateOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_Create_Call) Return(_a0 *corev1.Service, _a1 error) *mockServiceInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockServiceInterface_Create_Call) RunAndReturn(run func(context.Context, *corev1.Service, metav1.CreateOptions) (*corev1.Service, error)) *mockServiceInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, name, opts -func (_m *mockServiceInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - ret := _m.Called(ctx, name, opts) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { - r0 = rf(ctx, name, opts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockServiceInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type mockServiceInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - opts metav1.DeleteOptions -func (_e *mockServiceInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *mockServiceInterface_Delete_Call { - return &mockServiceInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)} -} - -func (_c *mockServiceInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts metav1.DeleteOptions)) *mockServiceInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(metav1.DeleteOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_Delete_Call) Return(_a0 error) *mockServiceInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockServiceInterface_Delete_Call) RunAndReturn(run func(context.Context, string, metav1.DeleteOptions) error) *mockServiceInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, name, opts -func (_m *mockServiceInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Service, error) { - ret := _m.Called(ctx, name, opts) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*corev1.Service, error)); ok { - return rf(ctx, name, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *corev1.Service); ok { - r0 = rf(ctx, name, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok { - r1 = rf(ctx, name, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockServiceInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - opts metav1.GetOptions -func (_e *mockServiceInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *mockServiceInterface_Get_Call { - return &mockServiceInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)} -} - -func (_c *mockServiceInterface_Get_Call) Run(run func(ctx context.Context, name string, opts metav1.GetOptions)) *mockServiceInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(metav1.GetOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_Get_Call) Return(_a0 *corev1.Service, _a1 error) *mockServiceInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockServiceInterface_Get_Call) RunAndReturn(run func(context.Context, string, metav1.GetOptions) (*corev1.Service, error)) *mockServiceInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, opts -func (_m *mockServiceInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.ServiceList, error) { - ret := _m.Called(ctx, opts) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 *corev1.ServiceList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*corev1.ServiceList, error)); ok { - return rf(ctx, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *corev1.ServiceList); ok { - r0 = rf(ctx, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.ServiceList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type mockServiceInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - opts metav1.ListOptions -func (_e *mockServiceInterface_Expecter) List(ctx interface{}, opts interface{}) *mockServiceInterface_List_Call { - return &mockServiceInterface_List_Call{Call: _e.mock.On("List", ctx, opts)} -} - -func (_c *mockServiceInterface_List_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockServiceInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(metav1.ListOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_List_Call) Return(_a0 *corev1.ServiceList, _a1 error) *mockServiceInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockServiceInterface_List_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (*corev1.ServiceList, error)) *mockServiceInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources -func (_m *mockServiceInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*corev1.Service, error) { - _va := make([]interface{}, len(subresources)) - for _i := range subresources { - _va[_i] = subresources[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, name, pt, data, opts) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.Service, error)); ok { - return rf(ctx, name, pt, data, opts, subresources...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *corev1.Service); ok { - r0 = rf(ctx, name, pt, data, opts, subresources...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) error); ok { - r1 = rf(ctx, name, pt, data, opts, subresources...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type mockServiceInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - pt types.PatchType -// - data []byte -// - opts metav1.PatchOptions -// - subresources ...string -func (_e *mockServiceInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *mockServiceInterface_Patch_Call { - return &mockServiceInterface_Patch_Call{Call: _e.mock.On("Patch", - append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)} -} - -func (_c *mockServiceInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string)) *mockServiceInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-5) - for i, a := range args[5:] { - if a != nil { - variadicArgs[i] = a.(string) - } - } - run(args[0].(context.Context), args[1].(string), args[2].(types.PatchType), args[3].([]byte), args[4].(metav1.PatchOptions), variadicArgs...) - }) - return _c -} - -func (_c *mockServiceInterface_Patch_Call) Return(result *corev1.Service, err error) *mockServiceInterface_Patch_Call { - _c.Call.Return(result, err) - return _c -} - -func (_c *mockServiceInterface_Patch_Call) RunAndReturn(run func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.Service, error)) *mockServiceInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// ProxyGet provides a mock function with given fields: scheme, name, port, path, params -func (_m *mockServiceInterface) ProxyGet(scheme string, name string, port string, path string, params map[string]string) rest.ResponseWrapper { - ret := _m.Called(scheme, name, port, path, params) - - if len(ret) == 0 { - panic("no return value specified for ProxyGet") - } - - var r0 rest.ResponseWrapper - if rf, ok := ret.Get(0).(func(string, string, string, string, map[string]string) rest.ResponseWrapper); ok { - r0 = rf(scheme, name, port, path, params) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(rest.ResponseWrapper) - } - } - - return r0 -} - -// mockServiceInterface_ProxyGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProxyGet' -type mockServiceInterface_ProxyGet_Call struct { - *mock.Call -} - -// ProxyGet is a helper method to define mock.On call -// - scheme string -// - name string -// - port string -// - path string -// - params map[string]string -func (_e *mockServiceInterface_Expecter) ProxyGet(scheme interface{}, name interface{}, port interface{}, path interface{}, params interface{}) *mockServiceInterface_ProxyGet_Call { - return &mockServiceInterface_ProxyGet_Call{Call: _e.mock.On("ProxyGet", scheme, name, port, path, params)} -} - -func (_c *mockServiceInterface_ProxyGet_Call) Run(run func(scheme string, name string, port string, path string, params map[string]string)) *mockServiceInterface_ProxyGet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string), args[2].(string), args[3].(string), args[4].(map[string]string)) - }) - return _c -} - -func (_c *mockServiceInterface_ProxyGet_Call) Return(_a0 rest.ResponseWrapper) *mockServiceInterface_ProxyGet_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockServiceInterface_ProxyGet_Call) RunAndReturn(run func(string, string, string, string, map[string]string) rest.ResponseWrapper) *mockServiceInterface_ProxyGet_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, service, opts -func (_m *mockServiceInterface) Update(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) { - ret := _m.Called(ctx, service, opts) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)); ok { - return rf(ctx, service, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) *corev1.Service); ok { - r0 = rf(ctx, service, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *corev1.Service, metav1.UpdateOptions) error); ok { - r1 = rf(ctx, service, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type mockServiceInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - service *corev1.Service -// - opts metav1.UpdateOptions -func (_e *mockServiceInterface_Expecter) Update(ctx interface{}, service interface{}, opts interface{}) *mockServiceInterface_Update_Call { - return &mockServiceInterface_Update_Call{Call: _e.mock.On("Update", ctx, service, opts)} -} - -func (_c *mockServiceInterface_Update_Call) Run(run func(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions)) *mockServiceInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*corev1.Service), args[2].(metav1.UpdateOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_Update_Call) Return(_a0 *corev1.Service, _a1 error) *mockServiceInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockServiceInterface_Update_Call) RunAndReturn(run func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)) *mockServiceInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateStatus provides a mock function with given fields: ctx, service, opts -func (_m *mockServiceInterface) UpdateStatus(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) { - ret := _m.Called(ctx, service, opts) - - if len(ret) == 0 { - panic("no return value specified for UpdateStatus") - } - - var r0 *corev1.Service - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)); ok { - return rf(ctx, service, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *corev1.Service, metav1.UpdateOptions) *corev1.Service); ok { - r0 = rf(ctx, service, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Service) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *corev1.Service, metav1.UpdateOptions) error); ok { - r1 = rf(ctx, service, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_UpdateStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStatus' -type mockServiceInterface_UpdateStatus_Call struct { - *mock.Call -} - -// UpdateStatus is a helper method to define mock.On call -// - ctx context.Context -// - service *corev1.Service -// - opts metav1.UpdateOptions -func (_e *mockServiceInterface_Expecter) UpdateStatus(ctx interface{}, service interface{}, opts interface{}) *mockServiceInterface_UpdateStatus_Call { - return &mockServiceInterface_UpdateStatus_Call{Call: _e.mock.On("UpdateStatus", ctx, service, opts)} -} - -func (_c *mockServiceInterface_UpdateStatus_Call) Run(run func(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions)) *mockServiceInterface_UpdateStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*corev1.Service), args[2].(metav1.UpdateOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_UpdateStatus_Call) Return(_a0 *corev1.Service, _a1 error) *mockServiceInterface_UpdateStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockServiceInterface_UpdateStatus_Call) RunAndReturn(run func(context.Context, *corev1.Service, metav1.UpdateOptions) (*corev1.Service, error)) *mockServiceInterface_UpdateStatus_Call { - _c.Call.Return(run) - return _c -} - -// Watch provides a mock function with given fields: ctx, opts -func (_m *mockServiceInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - ret := _m.Called(ctx, opts) - - if len(ret) == 0 { - panic("no return value specified for Watch") - } - - var r0 watch.Interface - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { - return rf(ctx, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) watch.Interface); ok { - r0 = rf(ctx, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(watch.Interface) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockServiceInterface_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' -type mockServiceInterface_Watch_Call struct { - *mock.Call -} - -// Watch is a helper method to define mock.On call -// - ctx context.Context -// - opts metav1.ListOptions -func (_e *mockServiceInterface_Expecter) Watch(ctx interface{}, opts interface{}) *mockServiceInterface_Watch_Call { - return &mockServiceInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)} -} - -func (_c *mockServiceInterface_Watch_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockServiceInterface_Watch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(metav1.ListOptions)) - }) - return _c -} - -func (_c *mockServiceInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *mockServiceInterface_Watch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockServiceInterface_Watch_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (watch.Interface, error)) *mockServiceInterface_Watch_Call { - _c.Call.Return(run) - return _c -} - -// newMockServiceInterface creates a new instance of mockServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockServiceInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *mockServiceInterface { - mock := &mockServiceInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/maintenance/mock_statefulSetInterface_test.go b/pkg/maintenance/mock_statefulSetInterface_test.go deleted file mode 100644 index 3318510..0000000 --- a/pkg/maintenance/mock_statefulSetInterface_test.go +++ /dev/null @@ -1,882 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package maintenance - -import ( - appsv1 "k8s.io/api/apps/v1" - apiautoscalingv1 "k8s.io/api/autoscaling/v1" - - autoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" - - context "context" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - mock "github.com/stretchr/testify/mock" - - types "k8s.io/apimachinery/pkg/types" - - v1 "k8s.io/client-go/applyconfigurations/apps/v1" - - watch "k8s.io/apimachinery/pkg/watch" -) - -// mockStatefulSetInterface is an autogenerated mock type for the statefulSetInterface type -type mockStatefulSetInterface struct { - mock.Mock -} - -type mockStatefulSetInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *mockStatefulSetInterface) EXPECT() *mockStatefulSetInterface_Expecter { - return &mockStatefulSetInterface_Expecter{mock: &_m.Mock} -} - -// Apply provides a mock function with given fields: ctx, statefulSet, opts -func (_m *mockStatefulSetInterface) Apply(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (*appsv1.StatefulSet, error) { - ret := _m.Called(ctx, statefulSet, opts) - - if len(ret) == 0 { - panic("no return value specified for Apply") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, statefulSet, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) *appsv1.StatefulSet); ok { - r0 = rf(ctx, statefulSet, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) error); ok { - r1 = rf(ctx, statefulSet, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply' -type mockStatefulSetInterface_Apply_Call struct { - *mock.Call -} - -// Apply is a helper method to define mock.On call -// - ctx context.Context -// - statefulSet *v1.StatefulSetApplyConfiguration -// - opts metav1.ApplyOptions -func (_e *mockStatefulSetInterface_Expecter) Apply(ctx interface{}, statefulSet interface{}, opts interface{}) *mockStatefulSetInterface_Apply_Call { - return &mockStatefulSetInterface_Apply_Call{Call: _e.mock.On("Apply", ctx, statefulSet, opts)} -} - -func (_c *mockStatefulSetInterface_Apply_Call) Run(run func(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions)) *mockStatefulSetInterface_Apply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.StatefulSetApplyConfiguration), args[2].(metav1.ApplyOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Apply_Call) Return(result *appsv1.StatefulSet, err error) *mockStatefulSetInterface_Apply_Call { - _c.Call.Return(result, err) - return _c -} - -func (_c *mockStatefulSetInterface_Apply_Call) RunAndReturn(run func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_Apply_Call { - _c.Call.Return(run) - return _c -} - -// ApplyScale provides a mock function with given fields: ctx, statefulSetName, scale, opts -func (_m *mockStatefulSetInterface) ApplyScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.ScaleApplyConfiguration, opts metav1.ApplyOptions) (*apiautoscalingv1.Scale, error) { - ret := _m.Called(ctx, statefulSetName, scale, opts) - - if len(ret) == 0 { - panic("no return value specified for ApplyScale") - } - - var r0 *apiautoscalingv1.Scale - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *autoscalingv1.ScaleApplyConfiguration, metav1.ApplyOptions) (*apiautoscalingv1.Scale, error)); ok { - return rf(ctx, statefulSetName, scale, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *autoscalingv1.ScaleApplyConfiguration, metav1.ApplyOptions) *apiautoscalingv1.Scale); ok { - r0 = rf(ctx, statefulSetName, scale, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiautoscalingv1.Scale) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *autoscalingv1.ScaleApplyConfiguration, metav1.ApplyOptions) error); ok { - r1 = rf(ctx, statefulSetName, scale, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_ApplyScale_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyScale' -type mockStatefulSetInterface_ApplyScale_Call struct { - *mock.Call -} - -// ApplyScale is a helper method to define mock.On call -// - ctx context.Context -// - statefulSetName string -// - scale *autoscalingv1.ScaleApplyConfiguration -// - opts metav1.ApplyOptions -func (_e *mockStatefulSetInterface_Expecter) ApplyScale(ctx interface{}, statefulSetName interface{}, scale interface{}, opts interface{}) *mockStatefulSetInterface_ApplyScale_Call { - return &mockStatefulSetInterface_ApplyScale_Call{Call: _e.mock.On("ApplyScale", ctx, statefulSetName, scale, opts)} -} - -func (_c *mockStatefulSetInterface_ApplyScale_Call) Run(run func(ctx context.Context, statefulSetName string, scale *autoscalingv1.ScaleApplyConfiguration, opts metav1.ApplyOptions)) *mockStatefulSetInterface_ApplyScale_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(*autoscalingv1.ScaleApplyConfiguration), args[3].(metav1.ApplyOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_ApplyScale_Call) Return(_a0 *apiautoscalingv1.Scale, _a1 error) *mockStatefulSetInterface_ApplyScale_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_ApplyScale_Call) RunAndReturn(run func(context.Context, string, *autoscalingv1.ScaleApplyConfiguration, metav1.ApplyOptions) (*apiautoscalingv1.Scale, error)) *mockStatefulSetInterface_ApplyScale_Call { - _c.Call.Return(run) - return _c -} - -// ApplyStatus provides a mock function with given fields: ctx, statefulSet, opts -func (_m *mockStatefulSetInterface) ApplyStatus(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions) (*appsv1.StatefulSet, error) { - ret := _m.Called(ctx, statefulSet, opts) - - if len(ret) == 0 { - panic("no return value specified for ApplyStatus") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, statefulSet, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) *appsv1.StatefulSet); ok { - r0 = rf(ctx, statefulSet, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) error); ok { - r1 = rf(ctx, statefulSet, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_ApplyStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyStatus' -type mockStatefulSetInterface_ApplyStatus_Call struct { - *mock.Call -} - -// ApplyStatus is a helper method to define mock.On call -// - ctx context.Context -// - statefulSet *v1.StatefulSetApplyConfiguration -// - opts metav1.ApplyOptions -func (_e *mockStatefulSetInterface_Expecter) ApplyStatus(ctx interface{}, statefulSet interface{}, opts interface{}) *mockStatefulSetInterface_ApplyStatus_Call { - return &mockStatefulSetInterface_ApplyStatus_Call{Call: _e.mock.On("ApplyStatus", ctx, statefulSet, opts)} -} - -func (_c *mockStatefulSetInterface_ApplyStatus_Call) Run(run func(ctx context.Context, statefulSet *v1.StatefulSetApplyConfiguration, opts metav1.ApplyOptions)) *mockStatefulSetInterface_ApplyStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*v1.StatefulSetApplyConfiguration), args[2].(metav1.ApplyOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_ApplyStatus_Call) Return(result *appsv1.StatefulSet, err error) *mockStatefulSetInterface_ApplyStatus_Call { - _c.Call.Return(result, err) - return _c -} - -func (_c *mockStatefulSetInterface_ApplyStatus_Call) RunAndReturn(run func(context.Context, *v1.StatefulSetApplyConfiguration, metav1.ApplyOptions) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_ApplyStatus_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, statefulSet, opts -func (_m *mockStatefulSetInterface) Create(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.CreateOptions) (*appsv1.StatefulSet, error) { - ret := _m.Called(ctx, statefulSet, opts) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.CreateOptions) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, statefulSet, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.CreateOptions) *appsv1.StatefulSet); ok { - r0 = rf(ctx, statefulSet, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *appsv1.StatefulSet, metav1.CreateOptions) error); ok { - r1 = rf(ctx, statefulSet, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type mockStatefulSetInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - statefulSet *appsv1.StatefulSet -// - opts metav1.CreateOptions -func (_e *mockStatefulSetInterface_Expecter) Create(ctx interface{}, statefulSet interface{}, opts interface{}) *mockStatefulSetInterface_Create_Call { - return &mockStatefulSetInterface_Create_Call{Call: _e.mock.On("Create", ctx, statefulSet, opts)} -} - -func (_c *mockStatefulSetInterface_Create_Call) Run(run func(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.CreateOptions)) *mockStatefulSetInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*appsv1.StatefulSet), args[2].(metav1.CreateOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Create_Call) Return(_a0 *appsv1.StatefulSet, _a1 error) *mockStatefulSetInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_Create_Call) RunAndReturn(run func(context.Context, *appsv1.StatefulSet, metav1.CreateOptions) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, name, opts -func (_m *mockStatefulSetInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - ret := _m.Called(ctx, name, opts) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { - r0 = rf(ctx, name, opts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockStatefulSetInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type mockStatefulSetInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - opts metav1.DeleteOptions -func (_e *mockStatefulSetInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *mockStatefulSetInterface_Delete_Call { - return &mockStatefulSetInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)} -} - -func (_c *mockStatefulSetInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts metav1.DeleteOptions)) *mockStatefulSetInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(metav1.DeleteOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Delete_Call) Return(_a0 error) *mockStatefulSetInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockStatefulSetInterface_Delete_Call) RunAndReturn(run func(context.Context, string, metav1.DeleteOptions) error) *mockStatefulSetInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts -func (_m *mockStatefulSetInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - ret := _m.Called(ctx, opts, listOpts) - - if len(ret) == 0 { - panic("no return value specified for DeleteCollection") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { - r0 = rf(ctx, opts, listOpts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockStatefulSetInterface_DeleteCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCollection' -type mockStatefulSetInterface_DeleteCollection_Call struct { - *mock.Call -} - -// DeleteCollection is a helper method to define mock.On call -// - ctx context.Context -// - opts metav1.DeleteOptions -// - listOpts metav1.ListOptions -func (_e *mockStatefulSetInterface_Expecter) DeleteCollection(ctx interface{}, opts interface{}, listOpts interface{}) *mockStatefulSetInterface_DeleteCollection_Call { - return &mockStatefulSetInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)} -} - -func (_c *mockStatefulSetInterface_DeleteCollection_Call) Run(run func(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions)) *mockStatefulSetInterface_DeleteCollection_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(metav1.DeleteOptions), args[2].(metav1.ListOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_DeleteCollection_Call) Return(_a0 error) *mockStatefulSetInterface_DeleteCollection_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockStatefulSetInterface_DeleteCollection_Call) RunAndReturn(run func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error) *mockStatefulSetInterface_DeleteCollection_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, name, opts -func (_m *mockStatefulSetInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*appsv1.StatefulSet, error) { - ret := _m.Called(ctx, name, opts) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, name, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *appsv1.StatefulSet); ok { - r0 = rf(ctx, name, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok { - r1 = rf(ctx, name, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockStatefulSetInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - opts metav1.GetOptions -func (_e *mockStatefulSetInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *mockStatefulSetInterface_Get_Call { - return &mockStatefulSetInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)} -} - -func (_c *mockStatefulSetInterface_Get_Call) Run(run func(ctx context.Context, name string, opts metav1.GetOptions)) *mockStatefulSetInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(metav1.GetOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Get_Call) Return(_a0 *appsv1.StatefulSet, _a1 error) *mockStatefulSetInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_Get_Call) RunAndReturn(run func(context.Context, string, metav1.GetOptions) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetScale provides a mock function with given fields: ctx, statefulSetName, options -func (_m *mockStatefulSetInterface) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*apiautoscalingv1.Scale, error) { - ret := _m.Called(ctx, statefulSetName, options) - - if len(ret) == 0 { - panic("no return value specified for GetScale") - } - - var r0 *apiautoscalingv1.Scale - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*apiautoscalingv1.Scale, error)); ok { - return rf(ctx, statefulSetName, options) - } - if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *apiautoscalingv1.Scale); ok { - r0 = rf(ctx, statefulSetName, options) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiautoscalingv1.Scale) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok { - r1 = rf(ctx, statefulSetName, options) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_GetScale_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetScale' -type mockStatefulSetInterface_GetScale_Call struct { - *mock.Call -} - -// GetScale is a helper method to define mock.On call -// - ctx context.Context -// - statefulSetName string -// - options metav1.GetOptions -func (_e *mockStatefulSetInterface_Expecter) GetScale(ctx interface{}, statefulSetName interface{}, options interface{}) *mockStatefulSetInterface_GetScale_Call { - return &mockStatefulSetInterface_GetScale_Call{Call: _e.mock.On("GetScale", ctx, statefulSetName, options)} -} - -func (_c *mockStatefulSetInterface_GetScale_Call) Run(run func(ctx context.Context, statefulSetName string, options metav1.GetOptions)) *mockStatefulSetInterface_GetScale_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(metav1.GetOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_GetScale_Call) Return(_a0 *apiautoscalingv1.Scale, _a1 error) *mockStatefulSetInterface_GetScale_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_GetScale_Call) RunAndReturn(run func(context.Context, string, metav1.GetOptions) (*apiautoscalingv1.Scale, error)) *mockStatefulSetInterface_GetScale_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, opts -func (_m *mockStatefulSetInterface) List(ctx context.Context, opts metav1.ListOptions) (*appsv1.StatefulSetList, error) { - ret := _m.Called(ctx, opts) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 *appsv1.StatefulSetList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*appsv1.StatefulSetList, error)); ok { - return rf(ctx, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *appsv1.StatefulSetList); ok { - r0 = rf(ctx, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSetList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type mockStatefulSetInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - opts metav1.ListOptions -func (_e *mockStatefulSetInterface_Expecter) List(ctx interface{}, opts interface{}) *mockStatefulSetInterface_List_Call { - return &mockStatefulSetInterface_List_Call{Call: _e.mock.On("List", ctx, opts)} -} - -func (_c *mockStatefulSetInterface_List_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockStatefulSetInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(metav1.ListOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_List_Call) Return(_a0 *appsv1.StatefulSetList, _a1 error) *mockStatefulSetInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_List_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (*appsv1.StatefulSetList, error)) *mockStatefulSetInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources -func (_m *mockStatefulSetInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*appsv1.StatefulSet, error) { - _va := make([]interface{}, len(subresources)) - for _i := range subresources { - _va[_i] = subresources[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, name, pt, data, opts) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, name, pt, data, opts, subresources...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *appsv1.StatefulSet); ok { - r0 = rf(ctx, name, pt, data, opts, subresources...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) error); ok { - r1 = rf(ctx, name, pt, data, opts, subresources...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type mockStatefulSetInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - pt types.PatchType -// - data []byte -// - opts metav1.PatchOptions -// - subresources ...string -func (_e *mockStatefulSetInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *mockStatefulSetInterface_Patch_Call { - return &mockStatefulSetInterface_Patch_Call{Call: _e.mock.On("Patch", - append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)} -} - -func (_c *mockStatefulSetInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string)) *mockStatefulSetInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]string, len(args)-5) - for i, a := range args[5:] { - if a != nil { - variadicArgs[i] = a.(string) - } - } - run(args[0].(context.Context), args[1].(string), args[2].(types.PatchType), args[3].([]byte), args[4].(metav1.PatchOptions), variadicArgs...) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Patch_Call) Return(result *appsv1.StatefulSet, err error) *mockStatefulSetInterface_Patch_Call { - _c.Call.Return(result, err) - return _c -} - -func (_c *mockStatefulSetInterface_Patch_Call) RunAndReturn(run func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, statefulSet, opts -func (_m *mockStatefulSetInterface) Update(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions) (*appsv1.StatefulSet, error) { - ret := _m.Called(ctx, statefulSet, opts) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, statefulSet, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) *appsv1.StatefulSet); ok { - r0 = rf(ctx, statefulSet, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) error); ok { - r1 = rf(ctx, statefulSet, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type mockStatefulSetInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - statefulSet *appsv1.StatefulSet -// - opts metav1.UpdateOptions -func (_e *mockStatefulSetInterface_Expecter) Update(ctx interface{}, statefulSet interface{}, opts interface{}) *mockStatefulSetInterface_Update_Call { - return &mockStatefulSetInterface_Update_Call{Call: _e.mock.On("Update", ctx, statefulSet, opts)} -} - -func (_c *mockStatefulSetInterface_Update_Call) Run(run func(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions)) *mockStatefulSetInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*appsv1.StatefulSet), args[2].(metav1.UpdateOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Update_Call) Return(_a0 *appsv1.StatefulSet, _a1 error) *mockStatefulSetInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_Update_Call) RunAndReturn(run func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateScale provides a mock function with given fields: ctx, statefulSetName, scale, opts -func (_m *mockStatefulSetInterface) UpdateScale(ctx context.Context, statefulSetName string, scale *apiautoscalingv1.Scale, opts metav1.UpdateOptions) (*apiautoscalingv1.Scale, error) { - ret := _m.Called(ctx, statefulSetName, scale, opts) - - if len(ret) == 0 { - panic("no return value specified for UpdateScale") - } - - var r0 *apiautoscalingv1.Scale - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *apiautoscalingv1.Scale, metav1.UpdateOptions) (*apiautoscalingv1.Scale, error)); ok { - return rf(ctx, statefulSetName, scale, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *apiautoscalingv1.Scale, metav1.UpdateOptions) *apiautoscalingv1.Scale); ok { - r0 = rf(ctx, statefulSetName, scale, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiautoscalingv1.Scale) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *apiautoscalingv1.Scale, metav1.UpdateOptions) error); ok { - r1 = rf(ctx, statefulSetName, scale, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_UpdateScale_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateScale' -type mockStatefulSetInterface_UpdateScale_Call struct { - *mock.Call -} - -// UpdateScale is a helper method to define mock.On call -// - ctx context.Context -// - statefulSetName string -// - scale *apiautoscalingv1.Scale -// - opts metav1.UpdateOptions -func (_e *mockStatefulSetInterface_Expecter) UpdateScale(ctx interface{}, statefulSetName interface{}, scale interface{}, opts interface{}) *mockStatefulSetInterface_UpdateScale_Call { - return &mockStatefulSetInterface_UpdateScale_Call{Call: _e.mock.On("UpdateScale", ctx, statefulSetName, scale, opts)} -} - -func (_c *mockStatefulSetInterface_UpdateScale_Call) Run(run func(ctx context.Context, statefulSetName string, scale *apiautoscalingv1.Scale, opts metav1.UpdateOptions)) *mockStatefulSetInterface_UpdateScale_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(*apiautoscalingv1.Scale), args[3].(metav1.UpdateOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_UpdateScale_Call) Return(_a0 *apiautoscalingv1.Scale, _a1 error) *mockStatefulSetInterface_UpdateScale_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_UpdateScale_Call) RunAndReturn(run func(context.Context, string, *apiautoscalingv1.Scale, metav1.UpdateOptions) (*apiautoscalingv1.Scale, error)) *mockStatefulSetInterface_UpdateScale_Call { - _c.Call.Return(run) - return _c -} - -// UpdateStatus provides a mock function with given fields: ctx, statefulSet, opts -func (_m *mockStatefulSetInterface) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions) (*appsv1.StatefulSet, error) { - ret := _m.Called(ctx, statefulSet, opts) - - if len(ret) == 0 { - panic("no return value specified for UpdateStatus") - } - - var r0 *appsv1.StatefulSet - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)); ok { - return rf(ctx, statefulSet, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) *appsv1.StatefulSet); ok { - r0 = rf(ctx, statefulSet, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.StatefulSet) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) error); ok { - r1 = rf(ctx, statefulSet, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_UpdateStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStatus' -type mockStatefulSetInterface_UpdateStatus_Call struct { - *mock.Call -} - -// UpdateStatus is a helper method to define mock.On call -// - ctx context.Context -// - statefulSet *appsv1.StatefulSet -// - opts metav1.UpdateOptions -func (_e *mockStatefulSetInterface_Expecter) UpdateStatus(ctx interface{}, statefulSet interface{}, opts interface{}) *mockStatefulSetInterface_UpdateStatus_Call { - return &mockStatefulSetInterface_UpdateStatus_Call{Call: _e.mock.On("UpdateStatus", ctx, statefulSet, opts)} -} - -func (_c *mockStatefulSetInterface_UpdateStatus_Call) Run(run func(ctx context.Context, statefulSet *appsv1.StatefulSet, opts metav1.UpdateOptions)) *mockStatefulSetInterface_UpdateStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*appsv1.StatefulSet), args[2].(metav1.UpdateOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_UpdateStatus_Call) Return(_a0 *appsv1.StatefulSet, _a1 error) *mockStatefulSetInterface_UpdateStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_UpdateStatus_Call) RunAndReturn(run func(context.Context, *appsv1.StatefulSet, metav1.UpdateOptions) (*appsv1.StatefulSet, error)) *mockStatefulSetInterface_UpdateStatus_Call { - _c.Call.Return(run) - return _c -} - -// Watch provides a mock function with given fields: ctx, opts -func (_m *mockStatefulSetInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - ret := _m.Called(ctx, opts) - - if len(ret) == 0 { - panic("no return value specified for Watch") - } - - var r0 watch.Interface - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { - return rf(ctx, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) watch.Interface); ok { - r0 = rf(ctx, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(watch.Interface) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { - r1 = rf(ctx, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockStatefulSetInterface_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' -type mockStatefulSetInterface_Watch_Call struct { - *mock.Call -} - -// Watch is a helper method to define mock.On call -// - ctx context.Context -// - opts metav1.ListOptions -func (_e *mockStatefulSetInterface_Expecter) Watch(ctx interface{}, opts interface{}) *mockStatefulSetInterface_Watch_Call { - return &mockStatefulSetInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)} -} - -func (_c *mockStatefulSetInterface_Watch_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockStatefulSetInterface_Watch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(metav1.ListOptions)) - }) - return _c -} - -func (_c *mockStatefulSetInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *mockStatefulSetInterface_Watch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockStatefulSetInterface_Watch_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (watch.Interface, error)) *mockStatefulSetInterface_Watch_Call { - _c.Call.Return(run) - return _c -} - -// newMockStatefulSetInterface creates a new instance of mockStatefulSetInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockStatefulSetInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *mockStatefulSetInterface { - mock := &mockStatefulSetInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/maintenance/mock_watcher_test.go b/pkg/maintenance/mock_watcher_test.go deleted file mode 100644 index 499dc65..0000000 --- a/pkg/maintenance/mock_watcher_test.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package maintenance - -import ( - mock "github.com/stretchr/testify/mock" - watch "k8s.io/apimachinery/pkg/watch" -) - -// mockWatcher is an autogenerated mock type for the watcher type -type mockWatcher struct { - mock.Mock -} - -type mockWatcher_Expecter struct { - mock *mock.Mock -} - -func (_m *mockWatcher) EXPECT() *mockWatcher_Expecter { - return &mockWatcher_Expecter{mock: &_m.Mock} -} - -// ResultChan provides a mock function with given fields: -func (_m *mockWatcher) ResultChan() <-chan watch.Event { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ResultChan") - } - - var r0 <-chan watch.Event - if rf, ok := ret.Get(0).(func() <-chan watch.Event); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan watch.Event) - } - } - - return r0 -} - -// mockWatcher_ResultChan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResultChan' -type mockWatcher_ResultChan_Call struct { - *mock.Call -} - -// ResultChan is a helper method to define mock.On call -func (_e *mockWatcher_Expecter) ResultChan() *mockWatcher_ResultChan_Call { - return &mockWatcher_ResultChan_Call{Call: _e.mock.On("ResultChan")} -} - -func (_c *mockWatcher_ResultChan_Call) Run(run func()) *mockWatcher_ResultChan_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockWatcher_ResultChan_Call) Return(_a0 <-chan watch.Event) *mockWatcher_ResultChan_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockWatcher_ResultChan_Call) RunAndReturn(run func() <-chan watch.Event) *mockWatcher_ResultChan_Call { - _c.Call.Return(run) - return _c -} - -// Stop provides a mock function with given fields: -func (_m *mockWatcher) Stop() { - _m.Called() -} - -// mockWatcher_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type mockWatcher_Stop_Call struct { - *mock.Call -} - -// Stop is a helper method to define mock.On call -func (_e *mockWatcher_Expecter) Stop() *mockWatcher_Stop_Call { - return &mockWatcher_Stop_Call{Call: _e.mock.On("Stop")} -} - -func (_c *mockWatcher_Stop_Call) Run(run func()) *mockWatcher_Stop_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockWatcher_Stop_Call) Return() *mockWatcher_Stop_Call { - _c.Call.Return() - return _c -} - -func (_c *mockWatcher_Stop_Call) RunAndReturn(run func()) *mockWatcher_Stop_Call { - _c.Call.Return(run) - return _c -} - -// newMockWatcher creates a new instance of mockWatcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockWatcher(t interface { - mock.TestingT - Cleanup(func()) -}) *mockWatcher { - mock := &mockWatcher{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/restore/createManager.go b/pkg/restore/createManager.go index 461de21..efecde6 100644 --- a/pkg/restore/createManager.go +++ b/pkg/restore/createManager.go @@ -4,11 +4,11 @@ import ( "context" "errors" "fmt" + "github.com/cloudogu/k8s-registry-lib/repository" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/log" v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" - "github.com/cloudogu/k8s-backup-operator/pkg/maintenance" restoreprovider "github.com/cloudogu/k8s-backup-operator/pkg/provider" ) @@ -29,10 +29,9 @@ func newCreateManager( ecosystemClientSet ecosystemInterface, namespace string, recorder eventRecorder, - globalConfigRepository globalConfigRepository, cleanup cleanupManager, ) *defaultCreateManager { - maintenanceSwitch := maintenance.NewWithLooseCoupling(globalConfigRepository) + maintenanceSwitch := repository.NewMaintenanceModeAdapter("k8s-backup-operator", ecosystemClientSet.CoreV1().ConfigMaps(namespace)) return &defaultCreateManager{ ecosystemClientSet: ecosystemClientSet, namespace: namespace, @@ -69,13 +68,13 @@ func (cm *defaultCreateManager) create(ctx context.Context, restore *v1.Restore) return fmt.Errorf("failed to get restore provider [%s]: %w", restore.Spec.Provider, err) } - err = cm.maintenanceModeSwitch.ActivateMaintenanceMode(ctx, maintenanceModeTitle, maintenanceModeText) + err = cm.maintenanceModeSwitch.Activate(ctx, repository.MaintenanceModeDescription{Title: maintenanceModeTitle, Text: maintenanceModeText}) if err != nil { return fmt.Errorf("failed to activate maintenance mode: %w", err) } defer func() { - errDefer := cm.maintenanceModeSwitch.DeactivateMaintenanceMode(ctx) + errDefer := cm.maintenanceModeSwitch.Deactivate(ctx) if errDefer != nil { logger.Error(fmt.Errorf("failed to deactivate maintenance mode: [%w]", errDefer), "restore error") } diff --git a/pkg/restore/createManager_test.go b/pkg/restore/createManager_test.go index 7f46e08..e0bedc5 100644 --- a/pkg/restore/createManager_test.go +++ b/pkg/restore/createManager_test.go @@ -3,7 +3,9 @@ package restore import ( v1 "github.com/cloudogu/k8s-backup-operator/pkg/api/v1" "github.com/cloudogu/k8s-backup-operator/pkg/provider" + "github.com/cloudogu/k8s-registry-lib/repository" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -13,11 +15,14 @@ import ( func Test_newCreateManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given - globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + configMapMock := newMockConfigMapInterface(t) + corev1Client := newMockCoreV1Interface(t) + corev1Client.EXPECT().ConfigMaps(mock.Anything).Return(configMapMock) clientSetMock := newMockEcosystemInterface(t) + clientSetMock.EXPECT().CoreV1().Return(corev1Client) // when - manager := newCreateManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock, nil) + manager := newCreateManager(clientSetMock, testNamespace, nil, nil) // then require.NotNil(t, manager) @@ -48,8 +53,8 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) restoreClientMock.EXPECT().UpdateStatusCompleted(testCtx, restore).Return(restore, nil) @@ -93,8 +98,8 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) cleanupMock := newMockCleanupManager(t) cleanupMock.EXPECT().Cleanup(testCtx).Return(nil) @@ -251,7 +256,7 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(assert.AnError) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(assert.AnError) v1Alpha1Client := newMockEcosystemV1Alpha1Interface(t) v1Alpha1Client.EXPECT().Restores(testNamespace).Return(restoreClientMock) clientSetMock := newMockEcosystemInterface(t) @@ -289,8 +294,8 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) cleanupMock := newMockCleanupManager(t) cleanupMock.EXPECT().Cleanup(testCtx).Return(assert.AnError) @@ -333,8 +338,8 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) cleanupMock := newMockCleanupManager(t) cleanupMock.EXPECT().Cleanup(testCtx).Return(nil) @@ -377,8 +382,8 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) cleanupMock := newMockCleanupManager(t) cleanupMock.EXPECT().Cleanup(testCtx).Return(nil) @@ -422,8 +427,8 @@ func Test_defaultCreateManager_create(t *testing.T) { defer func() { provider.NewVeleroProvider = oldNewVeleroProvider }() maintenanceModeMock := newMockMaintenanceModeSwitch(t) - maintenanceModeMock.EXPECT().ActivateMaintenanceMode(testCtx, "Service temporary unavailable", "Restore in progress").Return(nil) - maintenanceModeMock.EXPECT().DeactivateMaintenanceMode(testCtx).Return(nil) + maintenanceModeMock.EXPECT().Activate(testCtx, repository.MaintenanceModeDescription{Title: "Service temporary unavailable", Text: "Restore in progress"}).Return(nil) + maintenanceModeMock.EXPECT().Deactivate(testCtx).Return(nil) cleanupMock := newMockCleanupManager(t) cleanupMock.EXPECT().Cleanup(testCtx).Return(nil) diff --git a/pkg/restore/interfaces.go b/pkg/restore/interfaces.go index f3d8172..6eaae41 100644 --- a/pkg/restore/interfaces.go +++ b/pkg/restore/interfaces.go @@ -4,8 +4,9 @@ import ( "context" "github.com/cloudogu/k8s-backup-operator/pkg/cleanup" "github.com/cloudogu/k8s-registry-lib/config" + "github.com/cloudogu/k8s-registry-lib/repository" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" - v12 "k8s.io/client-go/kubernetes/typed/core/v1" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" @@ -44,10 +45,10 @@ type requeueHandler interface { } type maintenanceModeSwitch interface { - // ActivateMaintenanceMode activates the maintenance mode. - ActivateMaintenanceMode(ctx context.Context, title string, text string) error - // DeactivateMaintenanceMode deactivates the maintenance mode. - DeactivateMaintenanceMode(ctx context.Context) error + // Activate activates the maintenance mode. + Activate(ctx context.Context, description repository.MaintenanceModeDescription) error + // Deactivate deactivates the maintenance mode. + Deactivate(ctx context.Context) error } type cleanupManager interface { @@ -71,7 +72,7 @@ type statefulSetInterface interface { //nolint:unused //goland:noinspection GoUnusedType type serviceInterface interface { - v12.ServiceInterface + corev1.ServiceInterface } //nolint:unused @@ -83,7 +84,13 @@ type appsV1Interface interface { //nolint:unused //goland:noinspection GoUnusedType type coreV1Interface interface { - v12.CoreV1Interface + corev1.CoreV1Interface +} + +//nolint:unused +//goland:noinspection GoUnusedType +type configMapInterface interface { + corev1.ConfigMapInterface } //nolint:unused diff --git a/pkg/restore/manager.go b/pkg/restore/manager.go index 5aa7ae5..26774a4 100644 --- a/pkg/restore/manager.go +++ b/pkg/restore/manager.go @@ -10,11 +10,10 @@ func NewRestoreManager( clientSet ecosystemInterface, namespace string, recorder eventRecorder, - globalConfigRepository globalConfigRepository, cleanup cleanupManager, ) *defaultManager { return &defaultManager{ - createManager: newCreateManager(clientSet, namespace, recorder, globalConfigRepository, cleanup), + createManager: newCreateManager(clientSet, namespace, recorder, cleanup), deleteManager: newDeleteManager(clientSet, namespace, recorder), } } diff --git a/pkg/restore/manager_test.go b/pkg/restore/manager_test.go index c9547ae..0c4cf9d 100644 --- a/pkg/restore/manager_test.go +++ b/pkg/restore/manager_test.go @@ -1,6 +1,7 @@ package restore import ( + "github.com/stretchr/testify/mock" "testing" "github.com/stretchr/testify/require" @@ -9,11 +10,14 @@ import ( func TestNewRestoreManager(t *testing.T) { t.Run("success", func(t *testing.T) { // given - globalConfigRepositoryMock := newMockGlobalConfigRepository(t) + corev1Client := newMockCoreV1Interface(t) + configMapMock := newMockConfigMapInterface(t) + corev1Client.EXPECT().ConfigMaps(mock.Anything).Return(configMapMock) clientSetMock := newMockEcosystemInterface(t) + clientSetMock.EXPECT().CoreV1().Return(corev1Client) // when - manager := NewRestoreManager(clientSetMock, testNamespace, nil, globalConfigRepositoryMock, nil) + manager := NewRestoreManager(clientSetMock, testNamespace, nil, nil) // then require.NotNil(t, manager) diff --git a/pkg/restore/mock_configMapInterface_test.go b/pkg/restore/mock_configMapInterface_test.go new file mode 100644 index 0000000..ea6cd14 --- /dev/null +++ b/pkg/restore/mock_configMapInterface_test.go @@ -0,0 +1,577 @@ +// Code generated by mockery v2.42.1. DO NOT EDIT. + +package restore + +import ( + context "context" + + corev1 "k8s.io/api/core/v1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + mock "github.com/stretchr/testify/mock" + + types "k8s.io/apimachinery/pkg/types" + + v1 "k8s.io/client-go/applyconfigurations/core/v1" + + watch "k8s.io/apimachinery/pkg/watch" +) + +// mockConfigMapInterface is an autogenerated mock type for the configMapInterface type +type mockConfigMapInterface struct { + mock.Mock +} + +type mockConfigMapInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *mockConfigMapInterface) EXPECT() *mockConfigMapInterface_Expecter { + return &mockConfigMapInterface_Expecter{mock: &_m.Mock} +} + +// Apply provides a mock function with given fields: ctx, configMap, opts +func (_m *mockConfigMapInterface) Apply(ctx context.Context, configMap *v1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, configMap, opts) + + if len(ret) == 0 { + panic("no return value specified for Apply") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, configMap, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, configMap, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) error); ok { + r1 = rf(ctx, configMap, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply' +type mockConfigMapInterface_Apply_Call struct { + *mock.Call +} + +// Apply is a helper method to define mock.On call +// - ctx context.Context +// - configMap *v1.ConfigMapApplyConfiguration +// - opts metav1.ApplyOptions +func (_e *mockConfigMapInterface_Expecter) Apply(ctx interface{}, configMap interface{}, opts interface{}) *mockConfigMapInterface_Apply_Call { + return &mockConfigMapInterface_Apply_Call{Call: _e.mock.On("Apply", ctx, configMap, opts)} +} + +func (_c *mockConfigMapInterface_Apply_Call) Run(run func(ctx context.Context, configMap *v1.ConfigMapApplyConfiguration, opts metav1.ApplyOptions)) *mockConfigMapInterface_Apply_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*v1.ConfigMapApplyConfiguration), args[2].(metav1.ApplyOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_Apply_Call) Return(result *corev1.ConfigMap, err error) *mockConfigMapInterface_Apply_Call { + _c.Call.Return(result, err) + return _c +} + +func (_c *mockConfigMapInterface_Apply_Call) RunAndReturn(run func(context.Context, *v1.ConfigMapApplyConfiguration, metav1.ApplyOptions) (*corev1.ConfigMap, error)) *mockConfigMapInterface_Apply_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx, configMap, opts +func (_m *mockConfigMapInterface) Create(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.CreateOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, configMap, opts) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, configMap, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, configMap, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) error); ok { + r1 = rf(ctx, configMap, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type mockConfigMapInterface_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - configMap *corev1.ConfigMap +// - opts metav1.CreateOptions +func (_e *mockConfigMapInterface_Expecter) Create(ctx interface{}, configMap interface{}, opts interface{}) *mockConfigMapInterface_Create_Call { + return &mockConfigMapInterface_Create_Call{Call: _e.mock.On("Create", ctx, configMap, opts)} +} + +func (_c *mockConfigMapInterface_Create_Call) Run(run func(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.CreateOptions)) *mockConfigMapInterface_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*corev1.ConfigMap), args[2].(metav1.CreateOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_Create_Call) Return(_a0 *corev1.ConfigMap, _a1 error) *mockConfigMapInterface_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockConfigMapInterface_Create_Call) RunAndReturn(run func(context.Context, *corev1.ConfigMap, metav1.CreateOptions) (*corev1.ConfigMap, error)) *mockConfigMapInterface_Create_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, name, opts +func (_m *mockConfigMapInterface) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + ret := _m.Called(ctx, name, opts) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok { + r0 = rf(ctx, name, opts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockConfigMapInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type mockConfigMapInterface_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - opts metav1.DeleteOptions +func (_e *mockConfigMapInterface_Expecter) Delete(ctx interface{}, name interface{}, opts interface{}) *mockConfigMapInterface_Delete_Call { + return &mockConfigMapInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)} +} + +func (_c *mockConfigMapInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts metav1.DeleteOptions)) *mockConfigMapInterface_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(metav1.DeleteOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_Delete_Call) Return(_a0 error) *mockConfigMapInterface_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockConfigMapInterface_Delete_Call) RunAndReturn(run func(context.Context, string, metav1.DeleteOptions) error) *mockConfigMapInterface_Delete_Call { + _c.Call.Return(run) + return _c +} + +// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts +func (_m *mockConfigMapInterface) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + ret := _m.Called(ctx, opts, listOpts) + + if len(ret) == 0 { + panic("no return value specified for DeleteCollection") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok { + r0 = rf(ctx, opts, listOpts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// mockConfigMapInterface_DeleteCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCollection' +type mockConfigMapInterface_DeleteCollection_Call struct { + *mock.Call +} + +// DeleteCollection is a helper method to define mock.On call +// - ctx context.Context +// - opts metav1.DeleteOptions +// - listOpts metav1.ListOptions +func (_e *mockConfigMapInterface_Expecter) DeleteCollection(ctx interface{}, opts interface{}, listOpts interface{}) *mockConfigMapInterface_DeleteCollection_Call { + return &mockConfigMapInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)} +} + +func (_c *mockConfigMapInterface_DeleteCollection_Call) Run(run func(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions)) *mockConfigMapInterface_DeleteCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metav1.DeleteOptions), args[2].(metav1.ListOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_DeleteCollection_Call) Return(_a0 error) *mockConfigMapInterface_DeleteCollection_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockConfigMapInterface_DeleteCollection_Call) RunAndReturn(run func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error) *mockConfigMapInterface_DeleteCollection_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, name, opts +func (_m *mockConfigMapInterface) Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, name, opts) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, name, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, name, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok { + r1 = rf(ctx, name, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type mockConfigMapInterface_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - opts metav1.GetOptions +func (_e *mockConfigMapInterface_Expecter) Get(ctx interface{}, name interface{}, opts interface{}) *mockConfigMapInterface_Get_Call { + return &mockConfigMapInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)} +} + +func (_c *mockConfigMapInterface_Get_Call) Run(run func(ctx context.Context, name string, opts metav1.GetOptions)) *mockConfigMapInterface_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(metav1.GetOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_Get_Call) Return(_a0 *corev1.ConfigMap, _a1 error) *mockConfigMapInterface_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockConfigMapInterface_Get_Call) RunAndReturn(run func(context.Context, string, metav1.GetOptions) (*corev1.ConfigMap, error)) *mockConfigMapInterface_Get_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, opts +func (_m *mockConfigMapInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.ConfigMapList, error) { + ret := _m.Called(ctx, opts) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 *corev1.ConfigMapList + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (*corev1.ConfigMapList, error)); ok { + return rf(ctx, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *corev1.ConfigMapList); ok { + r0 = rf(ctx, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMapList) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { + r1 = rf(ctx, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type mockConfigMapInterface_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - opts metav1.ListOptions +func (_e *mockConfigMapInterface_Expecter) List(ctx interface{}, opts interface{}) *mockConfigMapInterface_List_Call { + return &mockConfigMapInterface_List_Call{Call: _e.mock.On("List", ctx, opts)} +} + +func (_c *mockConfigMapInterface_List_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockConfigMapInterface_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metav1.ListOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_List_Call) Return(_a0 *corev1.ConfigMapList, _a1 error) *mockConfigMapInterface_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockConfigMapInterface_List_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (*corev1.ConfigMapList, error)) *mockConfigMapInterface_List_Call { + _c.Call.Return(run) + return _c +} + +// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources +func (_m *mockConfigMapInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*corev1.ConfigMap, error) { + _va := make([]interface{}, len(subresources)) + for _i := range subresources { + _va[_i] = subresources[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, name, pt, data, opts) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Patch") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.ConfigMap, error)); ok { + return rf(ctx, name, pt, data, opts, subresources...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *corev1.ConfigMap); ok { + r0 = rf(ctx, name, pt, data, opts, subresources...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) error); ok { + r1 = rf(ctx, name, pt, data, opts, subresources...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' +type mockConfigMapInterface_Patch_Call struct { + *mock.Call +} + +// Patch is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - pt types.PatchType +// - data []byte +// - opts metav1.PatchOptions +// - subresources ...string +func (_e *mockConfigMapInterface_Expecter) Patch(ctx interface{}, name interface{}, pt interface{}, data interface{}, opts interface{}, subresources ...interface{}) *mockConfigMapInterface_Patch_Call { + return &mockConfigMapInterface_Patch_Call{Call: _e.mock.On("Patch", + append([]interface{}{ctx, name, pt, data, opts}, subresources...)...)} +} + +func (_c *mockConfigMapInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string)) *mockConfigMapInterface_Patch_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]string, len(args)-5) + for i, a := range args[5:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(types.PatchType), args[3].([]byte), args[4].(metav1.PatchOptions), variadicArgs...) + }) + return _c +} + +func (_c *mockConfigMapInterface_Patch_Call) Return(result *corev1.ConfigMap, err error) *mockConfigMapInterface_Patch_Call { + _c.Call.Return(result, err) + return _c +} + +func (_c *mockConfigMapInterface_Patch_Call) RunAndReturn(run func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) (*corev1.ConfigMap, error)) *mockConfigMapInterface_Patch_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, configMap, opts +func (_m *mockConfigMapInterface) Update(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.UpdateOptions) (*corev1.ConfigMap, error) { + ret := _m.Called(ctx, configMap, opts) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *corev1.ConfigMap + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) (*corev1.ConfigMap, error)); ok { + return rf(ctx, configMap, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) *corev1.ConfigMap); ok { + r0 = rf(ctx, configMap, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*corev1.ConfigMap) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) error); ok { + r1 = rf(ctx, configMap, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type mockConfigMapInterface_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - configMap *corev1.ConfigMap +// - opts metav1.UpdateOptions +func (_e *mockConfigMapInterface_Expecter) Update(ctx interface{}, configMap interface{}, opts interface{}) *mockConfigMapInterface_Update_Call { + return &mockConfigMapInterface_Update_Call{Call: _e.mock.On("Update", ctx, configMap, opts)} +} + +func (_c *mockConfigMapInterface_Update_Call) Run(run func(ctx context.Context, configMap *corev1.ConfigMap, opts metav1.UpdateOptions)) *mockConfigMapInterface_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*corev1.ConfigMap), args[2].(metav1.UpdateOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_Update_Call) Return(_a0 *corev1.ConfigMap, _a1 error) *mockConfigMapInterface_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockConfigMapInterface_Update_Call) RunAndReturn(run func(context.Context, *corev1.ConfigMap, metav1.UpdateOptions) (*corev1.ConfigMap, error)) *mockConfigMapInterface_Update_Call { + _c.Call.Return(run) + return _c +} + +// Watch provides a mock function with given fields: ctx, opts +func (_m *mockConfigMapInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + ret := _m.Called(ctx, opts) + + if len(ret) == 0 { + panic("no return value specified for Watch") + } + + var r0 watch.Interface + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) (watch.Interface, error)); ok { + return rf(ctx, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) watch.Interface); ok { + r0 = rf(ctx, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(watch.Interface) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok { + r1 = rf(ctx, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockConfigMapInterface_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch' +type mockConfigMapInterface_Watch_Call struct { + *mock.Call +} + +// Watch is a helper method to define mock.On call +// - ctx context.Context +// - opts metav1.ListOptions +func (_e *mockConfigMapInterface_Expecter) Watch(ctx interface{}, opts interface{}) *mockConfigMapInterface_Watch_Call { + return &mockConfigMapInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)} +} + +func (_c *mockConfigMapInterface_Watch_Call) Run(run func(ctx context.Context, opts metav1.ListOptions)) *mockConfigMapInterface_Watch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(metav1.ListOptions)) + }) + return _c +} + +func (_c *mockConfigMapInterface_Watch_Call) Return(_a0 watch.Interface, _a1 error) *mockConfigMapInterface_Watch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockConfigMapInterface_Watch_Call) RunAndReturn(run func(context.Context, metav1.ListOptions) (watch.Interface, error)) *mockConfigMapInterface_Watch_Call { + _c.Call.Return(run) + return _c +} + +// newMockConfigMapInterface creates a new instance of mockConfigMapInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockConfigMapInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *mockConfigMapInterface { + mock := &mockConfigMapInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/restore/mock_maintenanceModeSwitch_test.go b/pkg/restore/mock_maintenanceModeSwitch_test.go index 9746a25..1698bb1 100644 --- a/pkg/restore/mock_maintenanceModeSwitch_test.go +++ b/pkg/restore/mock_maintenanceModeSwitch_test.go @@ -5,6 +5,7 @@ package restore import ( context "context" + repository "github.com/cloudogu/k8s-registry-lib/repository" mock "github.com/stretchr/testify/mock" ) @@ -21,17 +22,17 @@ func (_m *mockMaintenanceModeSwitch) EXPECT() *mockMaintenanceModeSwitch_Expecte return &mockMaintenanceModeSwitch_Expecter{mock: &_m.Mock} } -// ActivateMaintenanceMode provides a mock function with given fields: ctx, title, text -func (_m *mockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context, title string, text string) error { - ret := _m.Called(ctx, title, text) +// Activate provides a mock function with given fields: ctx, description +func (_m *mockMaintenanceModeSwitch) Activate(ctx context.Context, description repository.MaintenanceModeDescription) error { + ret := _m.Called(ctx, description) if len(ret) == 0 { - panic("no return value specified for ActivateMaintenanceMode") + panic("no return value specified for Activate") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, title, text) + if rf, ok := ret.Get(0).(func(context.Context, repository.MaintenanceModeDescription) error); ok { + r0 = rf(ctx, description) } else { r0 = ret.Error(0) } @@ -39,42 +40,41 @@ func (_m *mockMaintenanceModeSwitch) ActivateMaintenanceMode(ctx context.Context return r0 } -// mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ActivateMaintenanceMode' -type mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call struct { +// mockMaintenanceModeSwitch_Activate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Activate' +type mockMaintenanceModeSwitch_Activate_Call struct { *mock.Call } -// ActivateMaintenanceMode is a helper method to define mock.On call +// Activate is a helper method to define mock.On call // - ctx context.Context -// - title string -// - text string -func (_e *mockMaintenanceModeSwitch_Expecter) ActivateMaintenanceMode(ctx interface{}, title interface{}, text interface{}) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { - return &mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call{Call: _e.mock.On("ActivateMaintenanceMode", ctx, title, text)} +// - description repository.MaintenanceModeDescription +func (_e *mockMaintenanceModeSwitch_Expecter) Activate(ctx interface{}, description interface{}) *mockMaintenanceModeSwitch_Activate_Call { + return &mockMaintenanceModeSwitch_Activate_Call{Call: _e.mock.On("Activate", ctx, description)} } -func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) Run(run func(ctx context.Context, title string, text string)) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { +func (_c *mockMaintenanceModeSwitch_Activate_Call) Run(run func(ctx context.Context, description repository.MaintenanceModeDescription)) *mockMaintenanceModeSwitch_Activate_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) + run(args[0].(context.Context), args[1].(repository.MaintenanceModeDescription)) }) return _c } -func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) Return(_a0 error) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { +func (_c *mockMaintenanceModeSwitch_Activate_Call) Return(_a0 error) *mockMaintenanceModeSwitch_Activate_Call { _c.Call.Return(_a0) return _c } -func (_c *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call) RunAndReturn(run func(context.Context, string, string) error) *mockMaintenanceModeSwitch_ActivateMaintenanceMode_Call { +func (_c *mockMaintenanceModeSwitch_Activate_Call) RunAndReturn(run func(context.Context, repository.MaintenanceModeDescription) error) *mockMaintenanceModeSwitch_Activate_Call { _c.Call.Return(run) return _c } -// DeactivateMaintenanceMode provides a mock function with given fields: ctx -func (_m *mockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Context) error { +// Deactivate provides a mock function with given fields: ctx +func (_m *mockMaintenanceModeSwitch) Deactivate(ctx context.Context) error { ret := _m.Called(ctx) if len(ret) == 0 { - panic("no return value specified for DeactivateMaintenanceMode") + panic("no return value specified for Deactivate") } var r0 error @@ -87,30 +87,30 @@ func (_m *mockMaintenanceModeSwitch) DeactivateMaintenanceMode(ctx context.Conte return r0 } -// mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeactivateMaintenanceMode' -type mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call struct { +// mockMaintenanceModeSwitch_Deactivate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deactivate' +type mockMaintenanceModeSwitch_Deactivate_Call struct { *mock.Call } -// DeactivateMaintenanceMode is a helper method to define mock.On call +// Deactivate is a helper method to define mock.On call // - ctx context.Context -func (_e *mockMaintenanceModeSwitch_Expecter) DeactivateMaintenanceMode(ctx interface{}) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { - return &mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call{Call: _e.mock.On("DeactivateMaintenanceMode", ctx)} +func (_e *mockMaintenanceModeSwitch_Expecter) Deactivate(ctx interface{}) *mockMaintenanceModeSwitch_Deactivate_Call { + return &mockMaintenanceModeSwitch_Deactivate_Call{Call: _e.mock.On("Deactivate", ctx)} } -func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) Run(run func(ctx context.Context)) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { +func (_c *mockMaintenanceModeSwitch_Deactivate_Call) Run(run func(ctx context.Context)) *mockMaintenanceModeSwitch_Deactivate_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } -func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) Return(_a0 error) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { +func (_c *mockMaintenanceModeSwitch_Deactivate_Call) Return(_a0 error) *mockMaintenanceModeSwitch_Deactivate_Call { _c.Call.Return(_a0) return _c } -func (_c *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call) RunAndReturn(run func(context.Context) error) *mockMaintenanceModeSwitch_DeactivateMaintenanceMode_Call { +func (_c *mockMaintenanceModeSwitch_Deactivate_Call) RunAndReturn(run func(context.Context) error) *mockMaintenanceModeSwitch_Deactivate_Call { _c.Call.Return(run) return _c } From 7fec5b053ee0d55df8c82d97ced9fd45525d647d Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 16 Oct 2024 09:20:37 +0200 Subject: [PATCH 14/19] #31 delete unused dependencies --- go.mod | 3 --- 1 file changed, 3 deletions(-) diff --git a/go.mod b/go.mod index d4cb695..e016a9a 100644 --- a/go.mod +++ b/go.mod @@ -6,13 +6,10 @@ toolchain go1.23.1 require ( github.com/Masterminds/semver/v3 v3.3.0 - github.com/cloudogu/cesapp-lib v0.14.0 github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085 github.com/dlclark/regexp2 v1.11.4 github.com/go-logr/logr v1.4.2 github.com/google/gnostic-models v0.6.8 - github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.34.2 github.com/stretchr/testify v1.9.0 github.com/vmware-tanzu/velero v1.12.1 k8s.io/api v0.31.1 From 08083dd243e04568553f0a3abb1c946a89ca9326 Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 16 Oct 2024 09:51:29 +0200 Subject: [PATCH 15/19] #31 delete unused interface and mocks --- pkg/backup/mock_requeuableError_test.go | 120 -------------- pkg/restore/interfaces.go | 6 - .../mock_globalConfigRepository_test.go | 151 ------------------ pkg/restore/mock_requeuableError_test.go | 120 -------------- 4 files changed, 397 deletions(-) delete mode 100644 pkg/backup/mock_requeuableError_test.go delete mode 100644 pkg/restore/mock_globalConfigRepository_test.go delete mode 100644 pkg/restore/mock_requeuableError_test.go diff --git a/pkg/backup/mock_requeuableError_test.go b/pkg/backup/mock_requeuableError_test.go deleted file mode 100644 index b983eb6..0000000 --- a/pkg/backup/mock_requeuableError_test.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. - -package backup - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// mockRequeuableError is an autogenerated mock type for the requeuableError type -type mockRequeuableError struct { - mock.Mock -} - -type mockRequeuableError_Expecter struct { - mock *mock.Mock -} - -func (_m *mockRequeuableError) EXPECT() *mockRequeuableError_Expecter { - return &mockRequeuableError_Expecter{mock: &_m.Mock} -} - -// Error provides a mock function with given fields: -func (_m *mockRequeuableError) Error() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// mockRequeuableError_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error' -type mockRequeuableError_Error_Call struct { - *mock.Call -} - -// Error is a helper method to define mock.On call -func (_e *mockRequeuableError_Expecter) Error() *mockRequeuableError_Error_Call { - return &mockRequeuableError_Error_Call{Call: _e.mock.On("Error")} -} - -func (_c *mockRequeuableError_Error_Call) Run(run func()) *mockRequeuableError_Error_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockRequeuableError_Error_Call) Return(_a0 string) *mockRequeuableError_Error_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockRequeuableError_Error_Call) RunAndReturn(run func() string) *mockRequeuableError_Error_Call { - _c.Call.Return(run) - return _c -} - -// GetRequeueTime provides a mock function with given fields: requeueTimeNanos -func (_m *mockRequeuableError) GetRequeueTime(requeueTimeNanos time.Duration) time.Duration { - ret := _m.Called(requeueTimeNanos) - - var r0 time.Duration - if rf, ok := ret.Get(0).(func(time.Duration) time.Duration); ok { - r0 = rf(requeueTimeNanos) - } else { - r0 = ret.Get(0).(time.Duration) - } - - return r0 -} - -// mockRequeuableError_GetRequeueTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequeueTime' -type mockRequeuableError_GetRequeueTime_Call struct { - *mock.Call -} - -// GetRequeueTime is a helper method to define mock.On call -// - requeueTimeNanos time.Duration -func (_e *mockRequeuableError_Expecter) GetRequeueTime(requeueTimeNanos interface{}) *mockRequeuableError_GetRequeueTime_Call { - return &mockRequeuableError_GetRequeueTime_Call{Call: _e.mock.On("GetRequeueTime", requeueTimeNanos)} -} - -func (_c *mockRequeuableError_GetRequeueTime_Call) Run(run func(requeueTimeNanos time.Duration)) *mockRequeuableError_GetRequeueTime_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(time.Duration)) - }) - return _c -} - -func (_c *mockRequeuableError_GetRequeueTime_Call) Return(_a0 time.Duration) *mockRequeuableError_GetRequeueTime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockRequeuableError_GetRequeueTime_Call) RunAndReturn(run func(time.Duration) time.Duration) *mockRequeuableError_GetRequeueTime_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTnewMockRequeuableError interface { - mock.TestingT - Cleanup(func()) -} - -// newMockRequeuableError creates a new instance of mockRequeuableError. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRequeuableError(t mockConstructorTestingTnewMockRequeuableError) *mockRequeuableError { - mock := &mockRequeuableError{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/restore/interfaces.go b/pkg/restore/interfaces.go index 6eaae41..74a0274 100644 --- a/pkg/restore/interfaces.go +++ b/pkg/restore/interfaces.go @@ -3,7 +3,6 @@ package restore import ( "context" "github.com/cloudogu/k8s-backup-operator/pkg/cleanup" - "github.com/cloudogu/k8s-registry-lib/config" "github.com/cloudogu/k8s-registry-lib/repository" appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" @@ -104,8 +103,3 @@ type ecosystemV1Alpha1Interface interface { type restoreProvider interface { provider.Provider } - -type globalConfigRepository interface { - Get(ctx context.Context) (config.GlobalConfig, error) - Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) -} diff --git a/pkg/restore/mock_globalConfigRepository_test.go b/pkg/restore/mock_globalConfigRepository_test.go deleted file mode 100644 index 80c1402..0000000 --- a/pkg/restore/mock_globalConfigRepository_test.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by mockery v2.42.1. DO NOT EDIT. - -package restore - -import ( - context "context" - - config "github.com/cloudogu/k8s-registry-lib/config" - - mock "github.com/stretchr/testify/mock" -) - -// mockGlobalConfigRepository is an autogenerated mock type for the globalConfigRepository type -type mockGlobalConfigRepository struct { - mock.Mock -} - -type mockGlobalConfigRepository_Expecter struct { - mock *mock.Mock -} - -func (_m *mockGlobalConfigRepository) EXPECT() *mockGlobalConfigRepository_Expecter { - return &mockGlobalConfigRepository_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx -func (_m *mockGlobalConfigRepository) Get(ctx context.Context) (config.GlobalConfig, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 config.GlobalConfig - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (config.GlobalConfig, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) config.GlobalConfig); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(config.GlobalConfig) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfigRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mockGlobalConfigRepository_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -func (_e *mockGlobalConfigRepository_Expecter) Get(ctx interface{}) *mockGlobalConfigRepository_Get_Call { - return &mockGlobalConfigRepository_Get_Call{Call: _e.mock.On("Get", ctx)} -} - -func (_c *mockGlobalConfigRepository_Get_Call) Run(run func(ctx context.Context)) *mockGlobalConfigRepository_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *mockGlobalConfigRepository_Get_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfigRepository_Get_Call) RunAndReturn(run func(context.Context) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, globalConfig -func (_m *mockGlobalConfigRepository) Update(ctx context.Context, globalConfig config.GlobalConfig) (config.GlobalConfig, error) { - ret := _m.Called(ctx, globalConfig) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 config.GlobalConfig - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)); ok { - return rf(ctx, globalConfig) - } - if rf, ok := ret.Get(0).(func(context.Context, config.GlobalConfig) config.GlobalConfig); ok { - r0 = rf(ctx, globalConfig) - } else { - r0 = ret.Get(0).(config.GlobalConfig) - } - - if rf, ok := ret.Get(1).(func(context.Context, config.GlobalConfig) error); ok { - r1 = rf(ctx, globalConfig) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mockGlobalConfigRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type mockGlobalConfigRepository_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - globalConfig config.GlobalConfig -func (_e *mockGlobalConfigRepository_Expecter) Update(ctx interface{}, globalConfig interface{}) *mockGlobalConfigRepository_Update_Call { - return &mockGlobalConfigRepository_Update_Call{Call: _e.mock.On("Update", ctx, globalConfig)} -} - -func (_c *mockGlobalConfigRepository_Update_Call) Run(run func(ctx context.Context, globalConfig config.GlobalConfig)) *mockGlobalConfigRepository_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(config.GlobalConfig)) - }) - return _c -} - -func (_c *mockGlobalConfigRepository_Update_Call) Return(_a0 config.GlobalConfig, _a1 error) *mockGlobalConfigRepository_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mockGlobalConfigRepository_Update_Call) RunAndReturn(run func(context.Context, config.GlobalConfig) (config.GlobalConfig, error)) *mockGlobalConfigRepository_Update_Call { - _c.Call.Return(run) - return _c -} - -// newMockGlobalConfigRepository creates a new instance of mockGlobalConfigRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGlobalConfigRepository(t interface { - mock.TestingT - Cleanup(func()) -}) *mockGlobalConfigRepository { - mock := &mockGlobalConfigRepository{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/pkg/restore/mock_requeuableError_test.go b/pkg/restore/mock_requeuableError_test.go deleted file mode 100644 index 0bcdfa9..0000000 --- a/pkg/restore/mock_requeuableError_test.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by mockery v2.20.0. DO NOT EDIT. - -package restore - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// mockRequeuableError is an autogenerated mock type for the requeuableError type -type mockRequeuableError struct { - mock.Mock -} - -type mockRequeuableError_Expecter struct { - mock *mock.Mock -} - -func (_m *mockRequeuableError) EXPECT() *mockRequeuableError_Expecter { - return &mockRequeuableError_Expecter{mock: &_m.Mock} -} - -// Error provides a mock function with given fields: -func (_m *mockRequeuableError) Error() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// mockRequeuableError_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error' -type mockRequeuableError_Error_Call struct { - *mock.Call -} - -// Error is a helper method to define mock.On call -func (_e *mockRequeuableError_Expecter) Error() *mockRequeuableError_Error_Call { - return &mockRequeuableError_Error_Call{Call: _e.mock.On("Error")} -} - -func (_c *mockRequeuableError_Error_Call) Run(run func()) *mockRequeuableError_Error_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mockRequeuableError_Error_Call) Return(_a0 string) *mockRequeuableError_Error_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockRequeuableError_Error_Call) RunAndReturn(run func() string) *mockRequeuableError_Error_Call { - _c.Call.Return(run) - return _c -} - -// GetRequeueTime provides a mock function with given fields: requeueTimeNanos -func (_m *mockRequeuableError) GetRequeueTime(requeueTimeNanos time.Duration) time.Duration { - ret := _m.Called(requeueTimeNanos) - - var r0 time.Duration - if rf, ok := ret.Get(0).(func(time.Duration) time.Duration); ok { - r0 = rf(requeueTimeNanos) - } else { - r0 = ret.Get(0).(time.Duration) - } - - return r0 -} - -// mockRequeuableError_GetRequeueTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequeueTime' -type mockRequeuableError_GetRequeueTime_Call struct { - *mock.Call -} - -// GetRequeueTime is a helper method to define mock.On call -// - requeueTimeNanos time.Duration -func (_e *mockRequeuableError_Expecter) GetRequeueTime(requeueTimeNanos interface{}) *mockRequeuableError_GetRequeueTime_Call { - return &mockRequeuableError_GetRequeueTime_Call{Call: _e.mock.On("GetRequeueTime", requeueTimeNanos)} -} - -func (_c *mockRequeuableError_GetRequeueTime_Call) Run(run func(requeueTimeNanos time.Duration)) *mockRequeuableError_GetRequeueTime_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(time.Duration)) - }) - return _c -} - -func (_c *mockRequeuableError_GetRequeueTime_Call) Return(_a0 time.Duration) *mockRequeuableError_GetRequeueTime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockRequeuableError_GetRequeueTime_Call) RunAndReturn(run func(time.Duration) time.Duration) *mockRequeuableError_GetRequeueTime_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTnewMockRequeuableError interface { - mock.TestingT - Cleanup(func()) -} - -// newMockRequeuableError creates a new instance of mockRequeuableError. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func newMockRequeuableError(t mockConstructorTestingTnewMockRequeuableError) *mockRequeuableError { - mock := &mockRequeuableError{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} From 6ba80c60b0fe50e2f2c7b0fe823489519a9bb6a4 Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 18 Oct 2024 09:59:02 +0200 Subject: [PATCH 16/19] #31 Use release registry-lib version and actual kubebuilder version in crds. --- go.mod | 2 +- go.sum | 2 ++ .../templates/k8s.cloudogu.com_backups.yaml | 20 +++++++++++++++---- .../k8s.cloudogu.com_backupschedules.yaml | 15 +++++++++++--- .../templates/k8s.cloudogu.com_restores.yaml | 15 +++++++++++--- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index e016a9a..ae619bd 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.23.1 require ( github.com/Masterminds/semver/v3 v3.3.0 - github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085 + github.com/cloudogu/k8s-registry-lib v0.5.0 github.com/dlclark/regexp2 v1.11.4 github.com/go-logr/logr v1.4.2 github.com/google/gnostic-models v0.6.8 diff --git a/go.sum b/go.sum index bb14de5..52567bc 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,8 @@ github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085 h1:geL github.com/cloudogu/k8s-registry-lib v0.2.2-0.20241008133309-abfe7e839085/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= github.com/cloudogu/k8s-registry-lib v0.4.1 h1:V5fOMIYYH1XqwNQ0NjTWViD1G4R146KQVjIuCuPO5dc= github.com/cloudogu/k8s-registry-lib v0.4.1/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= +github.com/cloudogu/k8s-registry-lib v0.5.0 h1:mdo8+0cSLicCNyymc8GbTl8ku5sMGA3IR/n5ga2WIvI= +github.com/cloudogu/k8s-registry-lib v0.5.0/go.mod h1:OHIrWCAOcc4nlmBK8G+vdHHJ8vo5QQvKCKIGTiFwYBo= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= diff --git a/k8s/helm-crd/templates/k8s.cloudogu.com_backups.yaml b/k8s/helm-crd/templates/k8s.cloudogu.com_backups.yaml index 45deb7e..721dcd6 100644 --- a/k8s/helm-crd/templates/k8s.cloudogu.com_backups.yaml +++ b/k8s/helm-crd/templates/k8s.cloudogu.com_backups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 labels: app: ces app.kubernetes.io/name: k8s-backup-operator @@ -24,10 +24,19 @@ spec: description: Backup is the Schema for the backups API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -38,7 +47,10 @@ spec: description: Provider defines the backup provider which should be used for the backup. type: string syncedFromProvider: - description: 'SyncedFromProvider defines that this backup already exists in the provider and its status should be synced. This is necessary because we cannot set the status of a backup on creation, see: https://stackoverflow.com/questions/73574615/how-to-create-kubernetes-objects-with-status-fields' + description: |- + SyncedFromProvider defines that this backup already exists in the provider and its status should be synced. + This is necessary because we cannot set the status of a backup on creation, see: + https://stackoverflow.com/questions/73574615/how-to-create-kubernetes-objects-with-status-fields type: boolean type: object status: diff --git a/k8s/helm-crd/templates/k8s.cloudogu.com_backupschedules.yaml b/k8s/helm-crd/templates/k8s.cloudogu.com_backupschedules.yaml index 2bc755c..f80d0a9 100644 --- a/k8s/helm-crd/templates/k8s.cloudogu.com_backupschedules.yaml +++ b/k8s/helm-crd/templates/k8s.cloudogu.com_backupschedules.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: backupschedules.k8s.cloudogu.com labels: app: ces @@ -24,10 +24,19 @@ spec: description: BackupSchedule is the Schema for the backupschedules API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object diff --git a/k8s/helm-crd/templates/k8s.cloudogu.com_restores.yaml b/k8s/helm-crd/templates/k8s.cloudogu.com_restores.yaml index b37afbd..ec90985 100644 --- a/k8s/helm-crd/templates/k8s.cloudogu.com_restores.yaml +++ b/k8s/helm-crd/templates/k8s.cloudogu.com_restores.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 labels: app: ces app.kubernetes.io/name: k8s-backup-operator @@ -24,10 +24,19 @@ spec: description: Restore is the Schema for the restores API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object From 9eab5c43dfab97e0a1e135582311fe907bfde024 Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 18 Oct 2024 10:26:10 +0200 Subject: [PATCH 17/19] #31 Add changelog entry. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c64251..6999edf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- [#31] Use cluster native config instead of the etcd. ## [v0.11.0] - 2024-09-18 ### Changed From 8676b8457f26fcce6cc1a84f0fb0da3fcedeed2c Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 18 Oct 2024 10:45:43 +0200 Subject: [PATCH 18/19] Bump version --- Dockerfile | 2 +- Makefile | 2 +- k8s/helm/component-patch-tpl.yaml | 2 +- k8s/helm/values.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f410a3a..9b9be92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN make compile-generic FROM gcr.io/distroless/static:nonroot LABEL maintainer="hello@cloudogu.com" \ NAME="k8s-backup-operator" \ - VERSION="0.11.0" + VERSION="1.0.0" WORKDIR / COPY --from=builder /workspace/target/k8s-backup-operator . diff --git a/Makefile b/Makefile index 164172f..5650c65 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Set these to the desired values ARTIFACT_ID=k8s-backup-operator -VERSION=0.11.0 +VERSION=1.0.0 IMAGE=cloudogu/${ARTIFACT_ID}:${VERSION} GOTAG?=1.23 LINT_VERSION=v1.61.0 diff --git a/k8s/helm/component-patch-tpl.yaml b/k8s/helm/component-patch-tpl.yaml index ca1389e..d3b221d 100644 --- a/k8s/helm/component-patch-tpl.yaml +++ b/k8s/helm/component-patch-tpl.yaml @@ -1,7 +1,7 @@ apiVersion: v1 values: images: - backupOperator: cloudogu/k8s-backup-operator:0.11.0 + backupOperator: cloudogu/k8s-backup-operator:1.0.0 kubeRbacProxy: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1 patches: values.yaml: diff --git a/k8s/helm/values.yaml b/k8s/helm/values.yaml index e2b563d..a2aec47 100644 --- a/k8s/helm/values.yaml +++ b/k8s/helm/values.yaml @@ -18,7 +18,7 @@ manager: logLevel: info image: repository: cloudogu/k8s-backup-operator - tag: 0.11.0 + tag: 1.0.0 imagePullPolicy: IfNotPresent resources: limits: From 7d2d24b9cc72458e729b9d8c8659e39bce9b7676 Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 18 Oct 2024 10:45:45 +0200 Subject: [PATCH 19/19] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6999edf..ae2a39f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [v1.0.0] - 2024-10-18 ### Changed - [#31] Use cluster native config instead of the etcd.