Documentation ¶
Overview ¶
Copyright © 2019 Portworx
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 ¶
- func ExecuteCli(cli string) ([]string, []string, error)
- func GenVolName(prefix string) string
- func PxTestCreateAggrVolume(t *testing.T, volName string, size uint64, aggrLevel uint32)
- func PxTestCreateClone(t *testing.T, volId string, cloneName string)
- func PxTestCreateEncrypVolume(t *testing.T, volName string, size uint64)
- func PxTestCreateIoProfVolume(t *testing.T, volName string, size uint64, IoProfile string)
- func PxTestCreateJournalVolume(t *testing.T, volName string, size uint64)
- func PxTestCreateSnapshot(t *testing.T, volId string, snapName string)
- func PxTestCreateStickyVolume(t *testing.T, volName string, size uint64)
- func PxTestCreateVolume(t *testing.T, volName string, size uint64)
- func PxTestCreateVolumeSnap(t *testing.T, volName string, policy string)
- func PxTestCreateVolumeWithAccess(t *testing.T, volName string, size uint64, groups string, collaborators string)
- func PxTestCreateVolumeWithLabel(t *testing.T, volName string, size uint64, labels string)
- func PxTestDeleteVolume(t *testing.T, volName string)
- func PxTestGetAllVolumes(t *testing.T) []string
- func PxTestGetVolumeWithLabels(t *testing.T, selector string) (*bytes.Buffer, error)
- func PxTestGetVolumeWithNameSelector(t *testing.T, volName string, selector string)
- func PxTestHasVolume(id string) bool
- func PxTestPatchVolumeAddCollaborators(t *testing.T, volName string, collaborators string)
- func PxTestPatchVolumeAddGroups(t *testing.T, volName string, groups string)
- func PxTestPatchVolumeAsyncIo(t *testing.T, volName string, value string)
- func PxTestPatchVolumeEarlyAck(t *testing.T, volName string, value string)
- func PxTestPatchVolumeHalevel(t *testing.T, volName string, haLevel int)
- func PxTestPatchVolumeHalevelWithNodes(t *testing.T, volName string, haLevel int64, node string)
- func PxTestPatchVolumeIoProfile(t *testing.T, volName string, profile string)
- func PxTestPatchVolumeNoDiscard(t *testing.T, volName string, value string)
- func PxTestPatchVolumeRemoveAllCollaborators(t *testing.T, volName string)
- func PxTestPatchVolumeRemoveAllGroups(t *testing.T, volName string)
- func PxTestPatchVolumeRemoveCollaborators(t *testing.T, volName string, collaborators string)
- func PxTestPatchVolumeRemoveGroups(t *testing.T, volName string, groups string)
- func PxTestPatchVolumeResize(t *testing.T, volName string, size uint64)
- func PxTestPatchVolumeShared(t *testing.T, volName string, shared string)
- func PxTestSetupCli(args string) (*bytes.Buffer, *bytes.Buffer, tests.Restorer)
- func PxTestVolumeInfo(t *testing.T, id string) *api.Volume
- func RunPx() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCli ¶
Execute cli and return string lists of standard out, standard error, and error if any. Callers must managage global variables using Patch from pkg/tests
func GenVolName ¶
genVolName generates a unique name for a volume appended to a prefix
func PxTestCreateAggrVolume ¶
Helper function to create volume with "aggregation level" flag set
func PxTestCreateClone ¶
Takes a volume name and clone name
func PxTestCreateEncrypVolume ¶
Helper function to create volume with "encryption" flag set
func PxTestCreateIoProfVolume ¶
Helper function to create volume with "io profile" flag set
func PxTestCreateJournalVolume ¶
Helper function to create volume with "journal" flag set
func PxTestCreateSnapshot ¶
Takes a volume name and snapshot name
func PxTestCreateStickyVolume ¶
Helper function to create volume with "sticky" flag set
func PxTestCreateVolume ¶
Takes a volume name and size. Returns the created volume id. For some reason our test container only recoganizes id and not name for some calls.
func PxTestCreateVolumeSnap ¶ added in v0.22.0
func PxTestCreateVolumeWithAccess ¶
func PxTestCreateVolumeWithAccess(t *testing.T, volName string, size uint64, groups string, collaborators string)
Helper function to create volume with access (--groups and --collaborators) flag set
func PxTestCreateVolumeWithLabel ¶
Takes a volume name and size. Returns the created volume id.
func PxTestDeleteVolume ¶
Deletes specified volume
func PxTestGetAllVolumes ¶
Returns a list of all volume ids TODO: We may need to bring this back to the TestXXX functions
depending on what it does, because the output would be parse, and as a library function, it may be easier to get a specific volume.
func PxTestPatchVolumeAsyncIo ¶ added in v0.22.0
func PxTestPatchVolumeEarlyAck ¶ added in v0.22.0
func PxTestPatchVolumeIoProfile ¶ added in v0.22.0
func PxTestPatchVolumeNoDiscard ¶ added in v0.22.0
func PxTestPatchVolumeResize ¶
func PxTestPatchVolumeShared ¶
func PxTestSetupCli ¶
Returns a buffer for stdout, stderr, and a function. The function should be used as a defer to restore the state See status_test.go for an example
func PxTestVolumeInfo ¶
Return volume information TODO: If necessary, we can do a `pxc volume list <id> -o json` then
unmarshal the JSON to appropriate object then return the &api.Volume inside of it.
Types ¶
This section is empty.