api_test.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. Copyright 2019 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 testsuites_test is used intentionally to ensure that the
  14. // code below only has access to exported names. It doesn't have any
  15. // actual test. That the custom volume test suite defined below
  16. // compile is the test.
  17. //
  18. // It's needed because we don't have any in-tree volume test
  19. // suite implementations that aren't in the "testuites" package itself.
  20. // We don't need this for the "TestDriver" interface because there
  21. // we have implementations in a separate package.
  22. package testsuites_test
  23. import (
  24. "k8s.io/kubernetes/test/e2e/framework/volume"
  25. "k8s.io/kubernetes/test/e2e/storage/testpatterns"
  26. "k8s.io/kubernetes/test/e2e/storage/testsuites"
  27. )
  28. type fakeSuite struct {
  29. }
  30. func (f *fakeSuite) GetTestSuiteInfo() testsuites.TestSuiteInfo {
  31. return testsuites.TestSuiteInfo{
  32. Name: "fake",
  33. FeatureTag: "",
  34. TestPatterns: []testpatterns.TestPattern{testpatterns.DefaultFsDynamicPV},
  35. SupportedSizeRange: volume.SizeRange{Min: "1Mi", Max: "1Gi"},
  36. }
  37. }
  38. func (f *fakeSuite) DefineTests(testsuites.TestDriver, testpatterns.TestPattern) {
  39. }
  40. func (f *fakeSuite) SkipRedundantSuite(testsuites.TestDriver, testpatterns.TestPattern) {
  41. }
  42. var _ testsuites.TestSuite = &fakeSuite{}