mock_volume.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. Copyright 2016 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package testing
  14. import (
  15. "github.com/stretchr/testify/mock"
  16. . "k8s.io/kubernetes/pkg/volume"
  17. )
  18. // ORIGINALLY GENERATED BY mockery with hand edits
  19. type MockVolume struct {
  20. mock.Mock
  21. }
  22. // GetPath provides a mock function with given fields:
  23. func (_m *MockVolume) GetPath() string {
  24. ret := _m.Called()
  25. var r0 string
  26. if rf, ok := ret.Get(0).(func() string); ok {
  27. r0 = rf()
  28. } else {
  29. r0 = ret.Get(0).(string)
  30. }
  31. return r0
  32. }
  33. // GetMetrics provides a mock function with given fields:
  34. func (_m *MockVolume) GetMetrics() (*Metrics, error) {
  35. ret := _m.Called()
  36. var r0 *Metrics
  37. if rf, ok := ret.Get(0).(func() *Metrics); ok {
  38. r0 = rf()
  39. } else {
  40. if ret.Get(0) != nil {
  41. r0 = ret.Get(0).(*Metrics)
  42. }
  43. }
  44. var r1 error
  45. if rf, ok := ret.Get(1).(func() error); ok {
  46. r1 = rf()
  47. } else {
  48. r1 = ret.Error(1)
  49. }
  50. return r0, r1
  51. }