testutils

package
v0.0.0-...-8427cc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright IBM Corp. 2018, 2019.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright IBM Corp. 2018.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

Functions

func AssertEquals

func AssertEquals(t *testing.T, received interface{}, expected interface{})

func MockPV

func MockPV() *v1.PersistentVolume

Creates a new Persistent Volume resource we can test on

func MockPVC

func MockPVC(testFlags ...string) *v1.PersistentVolumeClaim

Creates a new Persistent Volume Claim resource we can test on

func MockReclaimPolicy

func MockReclaimPolicy() v1.PersistentVolumeReclaimPolicy

func MockVolumeOptions

func MockVolumeOptions(policy v1.PersistentVolumeReclaimPolicy, name string, pvc *v1.PersistentVolumeClaim, parameters map[string](string)) controller.VolumeOptions

Creates fake volume options based on based in parameters

func MuxHandleCreate

func MuxHandleCreate(t *testing.T)

register mux for handling volume create

func MuxHandleDelete

func MuxHandleDelete(t *testing.T, volumeID string)

Register mux for handling volume delete of given volumeID

func SetupHTTP

func SetupHTTP()

func TearDownHTTP

func TearDownHTTP()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL