terraform-provider-stackitp.../pkg/sfsbeta/api_default_test.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

1238 lines
45 KiB
Go

/*
STACKIT File Storage (SFS)
Testing DefaultApiService
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
package sfsbeta
import (
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"net/url"
"strings"
"testing"
"github.com/stackitcloud/stackit-sdk-go/core/config"
)
func Test_sfsbeta_DefaultApiService(t *testing.T) {
t.Run("Test DefaultApiService CreateResourcePool", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := CreateResourcePoolResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
createResourcePoolPayload := CreateResourcePoolPayload{}
resp, reqErr := apiClient.CreateResourcePool(context.Background(), projectId, region).CreateResourcePoolPayload(createResourcePoolPayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService CreateResourcePoolSnapshot", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := CreateResourcePoolSnapshotResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
createResourcePoolSnapshotPayload := CreateResourcePoolSnapshotPayload{}
resp, reqErr := apiClient.CreateResourcePoolSnapshot(context.Background(), projectId, region, resourcePoolId).CreateResourcePoolSnapshotPayload(createResourcePoolSnapshotPayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService CreateShare", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := CreateShareResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
createSharePayload := CreateSharePayload{}
resp, reqErr := apiClient.CreateShare(context.Background(), projectId, region, resourcePoolId).CreateSharePayload(createSharePayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService CreateShareExportPolicy", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := CreateShareExportPolicyResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
createShareExportPolicyPayload := CreateShareExportPolicyPayload{}
resp, reqErr := apiClient.CreateShareExportPolicy(context.Background(), projectId, region).CreateShareExportPolicyPayload(createShareExportPolicyPayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService DeleteResourcePool", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := map[string]interface{}{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
resp, reqErr := apiClient.DeleteResourcePool(context.Background(), projectId, region, resourcePoolId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService DeleteResourcePoolSnapshot", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
snapshotNameValue := "snapshotName-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"snapshotName"+"}", url.PathEscape(ParameterValueToString(snapshotNameValue, "snapshotName")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := map[string]interface{}{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
snapshotName := snapshotNameValue
resp, reqErr := apiClient.DeleteResourcePoolSnapshot(context.Background(), projectId, region, resourcePoolId, snapshotName).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService DeleteShare", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
shareIdValue := "shareId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"shareId"+"}", url.PathEscape(ParameterValueToString(shareIdValue, "shareId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := map[string]interface{}{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
shareId := shareIdValue
resp, reqErr := apiClient.DeleteShare(context.Background(), projectId, region, resourcePoolId, shareId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService DeleteShareExportPolicy", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
policyIdValue := "policyId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"policyId"+"}", url.PathEscape(ParameterValueToString(policyIdValue, "policyId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := map[string]interface{}{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
policyId := policyIdValue
resp, reqErr := apiClient.DeleteShareExportPolicy(context.Background(), projectId, region, policyId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService GetResourcePool", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := GetResourcePoolResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
resp, reqErr := apiClient.GetResourcePool(context.Background(), projectId, region, resourcePoolId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService GetResourcePoolSnapshot", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
snapshotNameValue := "snapshotName-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"snapshotName"+"}", url.PathEscape(ParameterValueToString(snapshotNameValue, "snapshotName")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := GetResourcePoolSnapshotResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
snapshotName := snapshotNameValue
resp, reqErr := apiClient.GetResourcePoolSnapshot(context.Background(), projectId, region, resourcePoolId, snapshotName).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService GetShare", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
shareIdValue := "shareId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"shareId"+"}", url.PathEscape(ParameterValueToString(shareIdValue, "shareId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := GetShareResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
shareId := shareIdValue
resp, reqErr := apiClient.GetShare(context.Background(), projectId, region, resourcePoolId, shareId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService GetShareExportPolicy", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
policyIdValue := "policyId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"policyId"+"}", url.PathEscape(ParameterValueToString(policyIdValue, "policyId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := GetShareExportPolicyResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
policyId := policyIdValue
resp, reqErr := apiClient.GetShareExportPolicy(context.Background(), projectId, region, policyId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService ListPerformanceClasses", func(t *testing.T) {
_apiUrlPath := "/v1beta/resourcePoolPerformanceClasses"
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := ListPerformanceClassesResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
resp, reqErr := apiClient.ListPerformanceClasses(context.Background()).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService ListResourcePoolSnapshots", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := ListResourcePoolSnapshotsResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
resp, reqErr := apiClient.ListResourcePoolSnapshots(context.Background(), projectId, region, resourcePoolId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService ListResourcePools", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := ListResourcePoolsResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resp, reqErr := apiClient.ListResourcePools(context.Background(), projectId, region).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService ListShareExportPolicies", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := ListShareExportPoliciesResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resp, reqErr := apiClient.ListShareExportPolicies(context.Background(), projectId, region).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService ListShares", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := ListSharesResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
resp, reqErr := apiClient.ListShares(context.Background(), projectId, region, resourcePoolId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService ListSnapshotSchedules", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/snapshotSchedules"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := ListSnapshotSchedulesResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
resp, reqErr := apiClient.ListSnapshotSchedules(context.Background(), projectId).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService UpdateResourcePool", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := UpdateResourcePoolResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
updateResourcePoolPayload := UpdateResourcePoolPayload{}
resp, reqErr := apiClient.UpdateResourcePool(context.Background(), projectId, region, resourcePoolId).UpdateResourcePoolPayload(updateResourcePoolPayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService UpdateShare", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
resourcePoolIdValue := "resourcePoolId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"resourcePoolId"+"}", url.PathEscape(ParameterValueToString(resourcePoolIdValue, "resourcePoolId")), -1)
shareIdValue := "shareId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"shareId"+"}", url.PathEscape(ParameterValueToString(shareIdValue, "shareId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := UpdateShareResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
resourcePoolId := resourcePoolIdValue
shareId := shareIdValue
updateSharePayload := UpdateSharePayload{}
resp, reqErr := apiClient.UpdateShare(context.Background(), projectId, region, resourcePoolId, shareId).UpdateSharePayload(updateSharePayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
t.Run("Test DefaultApiService UpdateShareExportPolicy", func(t *testing.T) {
_apiUrlPath := "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}"
projectIdValue := "projectId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1)
regionValue := "region-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1)
policyIdValue := "policyId-value"
_apiUrlPath = strings.Replace(_apiUrlPath, "{"+"policyId"+"}", url.PathEscape(ParameterValueToString(policyIdValue, "policyId")), -1)
testDefaultApiServeMux := http.NewServeMux()
testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) {
data := UpdateShareExportPolicyResponse{}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(data)
})
testServer := httptest.NewServer(testDefaultApiServeMux)
defer testServer.Close()
configuration := &config.Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/1.0.0/go",
Debug: false,
Region: "test_region",
Servers: config.ServerConfigurations{
{
URL: testServer.URL,
Description: "Localhost for sfsbeta_DefaultApi",
Variables: map[string]config.ServerVariable{
"region": {
DefaultValue: "test_region.",
EnumValues: []string{
"test_region.",
},
},
},
},
},
OperationServers: map[string]config.ServerConfigurations{},
}
apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication())
if err != nil {
t.Fatalf("creating API client: %v", err)
}
projectId := projectIdValue
region := regionValue
policyId := policyIdValue
updateShareExportPolicyPayload := UpdateShareExportPolicyPayload{}
resp, reqErr := apiClient.UpdateShareExportPolicy(context.Background(), projectId, region, policyId).UpdateShareExportPolicyPayload(updateShareExportPolicyPayload).Execute()
if reqErr != nil {
t.Fatalf("error in call: %v", reqErr)
}
if IsNil(resp) {
t.Fatalf("response not present")
}
})
}