inttests

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

GoPowerStore integration tests

You should export all ENV variables required for API client initialization before run this tests.

It's also possible to create GOPOWERSTORE_TEST.env which will hold all required vars

GOPOWERSTORE_TEST.env example:

GOPOWERSTORE_INSECURE=true
GOPOWERSTORE_HTTP_TIMEOUT=60
GOPOWERSTORE_APIURL=https://127.0.0.1/api/rest
GOPOWERSTORE_USERNAME=admin
GOPOWERSTORE_PASSWORD=Password
GOPOWERSTORE_DEBUG=true

Documentation

Index

Constants

View Source
const (
	TestVolumePrefix       = "test_vol_"
	DefaultVolSize   int64 = 1048576
	DefaultChunkSize int64 = 1048576
)

Variables

C is global powerstore Client instance for testing

Functions

func CreateVol added in v1.16.0

func CreateVol(t *testing.T) (volID, volName string)

func DeleteVol added in v1.16.0

func DeleteVol(t *testing.T, id string)

func GetNewClient added in v1.16.0

func GetNewClient() (client gopowerstore.Client)

func GetRemoteSystemForMetro added in v1.16.0

func GetRemoteSystemForMetro(client gopowerstore.Client, t *testing.T) gopowerstore.RemoteSystem

GetRemoteSystemForMetro queries the source PowerStore array for configured remote systems to find a remote system capable of metro replication and returns the system if one is found and an empty RemoteSystem struct otherwise.

func Includes added in v1.16.0

func Includes(list *[]string, target string) bool

check for the target string in the list of strings and return true if found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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