feature/shared file systems: share acceptance tests (#128)
* feature/filestorage: acceptance tests
Implements acceptance tests for `sharedfilesystems/v2/shares`
* sfs/acceptance: create share-network in env script
Adds creation of a share-network in the acceptance test environment
setup script, and stores the network id in an environment variable
* sfs: adds ShareNetworkID to AcceptanceTestChoices
Gets ShareNetworkID from the OS environment variable:
`OS_SHARE_NETWORK_ID`
* sfs: removes hard-coding of the share-network-id
* sfs: add OS_SHARE_NETWORK_ID to acceptance README
* sfs/acceptance: move WaitForStatus to acc. tests
Moves the `WaitForStatus`-function from the actual library to the
acceptance test folder and does not export it
diff --git a/acceptance/clients/clients.go b/acceptance/clients/clients.go
index 6658200..f07754f 100644
--- a/acceptance/clients/clients.go
+++ b/acceptance/clients/clients.go
@@ -32,6 +32,9 @@
// ExternalNetworkID is the network ID of the external network.
ExternalNetworkID string
+
+ // ShareNetworkID is the Manila Share network ID
+ ShareNetworkID string
}
// AcceptanceTestChoicesFromEnv populates a ComputeChoices struct from environment variables.
@@ -43,6 +46,7 @@
networkName := os.Getenv("OS_NETWORK_NAME")
floatingIPPoolName := os.Getenv("OS_POOL_NAME")
externalNetworkID := os.Getenv("OS_EXTGW_ID")
+ shareNetworkID := os.Getenv("OS_SHARE_NETWORK_ID")
missing := make([]string, 0, 3)
if imageID == "" {
@@ -63,7 +67,9 @@
if networkName == "" {
networkName = "private"
}
-
+ if shareNetworkID == "" {
+ missing = append(missing, "OS_SHARE_NETWORK_ID")
+ }
notDistinct := ""
if flavorID == flavorIDResize {
notDistinct = "OS_FLAVOR_ID and OS_FLAVOR_ID_RESIZE must be distinct."
@@ -81,7 +87,15 @@
return nil, fmt.Errorf(text)
}
- return &AcceptanceTestChoices{ImageID: imageID, FlavorID: flavorID, FlavorIDResize: flavorIDResize, FloatingIPPoolName: floatingIPPoolName, NetworkName: networkName, ExternalNetworkID: externalNetworkID}, nil
+ return &AcceptanceTestChoices{
+ ImageID: imageID,
+ FlavorID: flavorID,
+ FlavorIDResize: flavorIDResize,
+ FloatingIPPoolName: floatingIPPoolName,
+ NetworkName: networkName,
+ ExternalNetworkID: externalNetworkID,
+ ShareNetworkID: shareNetworkID,
+ }, nil
}
// NewBlockStorageV1Client returns a *ServiceClient for making calls