Versions in this module Expand all Collapse all v1 v1.3.1 Mar 10, 2020 Changes in this version + func AssertDeepEqual(t *testing.T, expected, actual interface{}) bool + func AssertErrorMatches(t *testing.T, expected string, actual error) bool + func CompareActions(t *testing.T, expected, actual []core.Action) + func GetAsMap(j string) (map[string]interface{}, error) + func NewLogger() logrus.FieldLogger + func TimesAreEqual(t1, t2 time.Time) bool + func UnstructuredOrDie(data string) *unstructured.Unstructured + func ValidatePatch(t *testing.T, action core.Action, expected interface{}, ...) + type APIResource struct + Group string + Items []metav1.Object + Name string + Namespaced bool + ShortName string + Version string + func CRDs(items ...metav1.Object) *APIResource + func Deployments(items ...metav1.Object) *APIResource + func ExtensionsDeployments(items ...metav1.Object) *APIResource + func Namespaces(items ...metav1.Object) *APIResource + func PVCs(items ...metav1.Object) *APIResource + func PVs(items ...metav1.Object) *APIResource + func Pods(items ...metav1.Object) *APIResource + func Secrets(items ...metav1.Object) *APIResource + func ServiceAccounts(items ...metav1.Object) *APIResource + func VSLs(items ...metav1.Object) *APIResource + func (r *APIResource) GVR() schema.GroupVersionResource + type APIServer struct + DiscoveryClient *DiscoveryClient + DynamicClient *dynamicfake.FakeDynamicClient + KubeClient *kubefake.Clientset + VeleroClient *fake.Clientset + func NewAPIServer(t *testing.T) *APIServer + type DiscoveryClient struct + func (c *DiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) + func (c *DiscoveryClient) WithAPIResource(resource *APIResource) *DiscoveryClient + type FakeDiscoveryHelper struct + APIGroupsList []metav1.APIGroup + AutoReturnResource bool + Mapper meta.RESTMapper + ResourceList []*metav1.APIResourceList + func NewFakeDiscoveryHelper(autoReturnResource bool, ...) *FakeDiscoveryHelper + func (dh *FakeDiscoveryHelper) APIGroups() []metav1.APIGroup + func (dh *FakeDiscoveryHelper) Refresh() error + func (dh *FakeDiscoveryHelper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, metav1.APIResource, error) + func (dh *FakeDiscoveryHelper) Resources() []*metav1.APIResourceList + type FakeDynamicClient struct + func (c *FakeDynamicClient) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) + func (c *FakeDynamicClient) Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) + func (c *FakeDynamicClient) List(options metav1.ListOptions) (runtime.Object, error) + func (c *FakeDynamicClient) Patch(name string, data []byte) (*unstructured.Unstructured, error) + func (c *FakeDynamicClient) Watch(options metav1.ListOptions) (watch.Interface, error) + type FakeDynamicFactory struct + func (df *FakeDynamicFactory) ClientForGroupVersionResource(gv schema.GroupVersion, resource metav1.APIResource, namespace string) (client.Dynamic, error) + type FakeFileSystem struct + ReadDirCalls []string + func NewFakeFileSystem() *FakeFileSystem + func (fs *FakeFileSystem) Create(name string) (io.WriteCloser, error) + func (fs *FakeFileSystem) DirExists(path string) (bool, error) + func (fs *FakeFileSystem) MkdirAll(path string, perm os.FileMode) error + func (fs *FakeFileSystem) ReadDir(dirname string) ([]os.FileInfo, error) + func (fs *FakeFileSystem) ReadFile(filename string) ([]byte, error) + func (fs *FakeFileSystem) RemoveAll(path string) error + func (fs *FakeFileSystem) Stat(path string) (os.FileInfo, error) + func (fs *FakeFileSystem) TempDir(dir, prefix string) (string, error) + func (fs *FakeFileSystem) TempFile(dir, prefix string) (filesystem.NameWriteCloser, error) + func (fs *FakeFileSystem) WithDirectories(path ...string) *FakeFileSystem + func (fs *FakeFileSystem) WithDirectory(path string) *FakeFileSystem + func (fs *FakeFileSystem) WithFile(path string, data []byte) *FakeFileSystem + func (fs *FakeFileSystem) WithFileAndMode(path string, data []byte, mode os.FileMode) *FakeFileSystem + type FakeMapper struct + AutoReturnResource bool + Resources map[schema.GroupVersionResource]schema.GroupVersionResource + func (m *FakeMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) + type FakeNamespaceClient struct + func (c *FakeNamespaceClient) Create(obj *v1.Namespace) (*v1.Namespace, error) + func (c *FakeNamespaceClient) Delete(name string, opts *metav1.DeleteOptions) error + func (c *FakeNamespaceClient) Finalize(item *v1.Namespace) (*v1.Namespace, error) + func (c *FakeNamespaceClient) Get(name string, opts metav1.GetOptions) (*v1.Namespace, error) + func (c *FakeNamespaceClient) List(options metav1.ListOptions) (*v1.NamespaceList, error) + func (c *FakeNamespaceClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v1.Namespace, error) + func (c *FakeNamespaceClient) Update(namespace *v1.Namespace) (*v1.Namespace, error) + func (c *FakeNamespaceClient) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, error) + func (c *FakeNamespaceClient) Watch(options metav1.ListOptions) (watch.Interface, error) + type FakeServerResourcesInterface struct + FailedGroups map[schema.GroupVersion]error + ResourceList []*metav1.APIResourceList + ReturnError error + func NewFakeServerResourcesInterface(resourceList []*metav1.APIResourceList, ...) *FakeServerResourcesInterface + func (di *FakeServerResourcesInterface) ServerPreferredResources() ([]*metav1.APIResourceList, error) + type FakeVolumeSnapshotter struct + Error error + RestorableVolumes map[VolumeBackupInfo]string + SnapshotsTaken sets.String + SnapshottableVolumes map[string]VolumeBackupInfo + VolumeID string + VolumeIDSet string + func (bs *FakeVolumeSnapshotter) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error) + func (bs *FakeVolumeSnapshotter) CreateVolumeFromSnapshot(snapshotID, volumeType, volumeAZ string, iops *int64) (string, error) + func (bs *FakeVolumeSnapshotter) DeleteSnapshot(snapshotID string) error + func (bs *FakeVolumeSnapshotter) GetVolumeID(pv runtime.Unstructured) (string, error) + func (bs *FakeVolumeSnapshotter) GetVolumeInfo(volumeID, volumeAZ string) (string, *int64, error) + func (bs *FakeVolumeSnapshotter) Init(config map[string]string) error + func (bs *FakeVolumeSnapshotter) SetVolumeID(pv runtime.Unstructured, volumeID string) (runtime.Unstructured, error) + type MockPodCommandExecutor struct + func (e *MockPodCommandExecutor) ExecutePodCommand(log logrus.FieldLogger, item map[string]interface{}, ...) error + type VolumeBackupInfo struct + AvailabilityZone string + Iops *int64 + SnapshotID string + Type string