v1.9.0
This commit is contained in:
@@ -17,7 +17,6 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/lb"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/locations"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/rg"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/sizes"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stack"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/tasks"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/vins"
|
||||
@@ -281,14 +280,6 @@ func TestGetListCloudAPI(t *testing.T) {
|
||||
t.Errorf("Can not test RG get because RG list is empty")
|
||||
}
|
||||
|
||||
// Sizes
|
||||
// List
|
||||
bytes, err = client.CloudAPI().Sizes().ListRaw(context.Background(), sizes.ListRequest{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
testLogs = append(testLogs, getResult("Sizes list", bytes, sizes.ListSizes{}, t))
|
||||
|
||||
// Stack
|
||||
// List
|
||||
bytes, err = client.CloudAPI().Stack().ListRaw(context.Background(), stack.ListRequest{})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -100,7 +100,10 @@ func getErrorsFromJSON(bytes []byte, t *testing.T, cloud string) {
|
||||
}
|
||||
|
||||
name := param["name"].(string)
|
||||
required := param["required"].(bool)
|
||||
required, ok := param["required"].(bool)
|
||||
if !ok {
|
||||
required = false
|
||||
}
|
||||
typ := p.(map[string]interface{})["type"].(string)
|
||||
|
||||
var items string
|
||||
|
||||
@@ -62,7 +62,7 @@ func getUrlsFromBytes(bytes []byte) ([]string, error) {
|
||||
}
|
||||
|
||||
func validateUrlFromJson(url string) bool {
|
||||
if !strings.HasPrefix(url, "/cloudapi/") && !strings.HasPrefix(url, "/cloudbroker/") {
|
||||
if !strings.HasPrefix(url, "/restmachine/cloudapi/") && !strings.HasPrefix(url, "/restmachine/cloudbroker/") {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -156,11 +156,13 @@ func readUrlFromFile(fileName string) ([]string, error) {
|
||||
for scanner.Scan() {
|
||||
if strings.Contains(scanner.Text(), `"/cloudapi/`) {
|
||||
indexStart := strings.Index(scanner.Text(), "/cloudapi/")
|
||||
result = append(result, strings.TrimRight(scanner.Text()[indexStart:], `"`))
|
||||
url := strings.Trim(scanner.Text()[indexStart:], `"`)
|
||||
result = append(result, "/restmachine"+url)
|
||||
}
|
||||
if strings.Contains(scanner.Text(), `"/cloudbroker/`) {
|
||||
indexStart := strings.Index(scanner.Text(), "/cloudbroker/")
|
||||
result = append(result, strings.TrimRight(scanner.Text()[indexStart:], `"`))
|
||||
url := strings.Trim(scanner.Text()[indexStart:], `"`)
|
||||
result = append(result, "/restmachine"+url)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user