v1.10.0
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"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"
|
||||
node_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/node"
|
||||
|
||||
account_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/account"
|
||||
audit_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/audit"
|
||||
@@ -563,6 +564,26 @@ func TestGetListCloudbroker(t *testing.T) {
|
||||
t.Errorf("Can not test LB get because LB list is empty")
|
||||
}
|
||||
|
||||
// Node
|
||||
// List
|
||||
bytes, err = client.CloudBroker().Node().ListRaw(context.Background(), node_cb.ListRequest{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
testLogs = append(testLogs, getResult("Node list", bytes, node_cb.ListNodes{}, t))
|
||||
// Get
|
||||
listNode, _ := client.CloudBroker().Node().List(context.Background(), node_cb.ListRequest{})
|
||||
if len(listLB.Data) > 0 {
|
||||
id := listNode.Data[0].ID
|
||||
bytes, err = client.CloudBroker().Node().GetRaw(context.Background(), node_cb.GetRequest{NID: id})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
testLogs = append(testLogs, getResult("Node get", bytes, node_cb.RecordNode{}, t))
|
||||
} else {
|
||||
t.Errorf("Can not test Node get because LB list is empty")
|
||||
}
|
||||
|
||||
// Pcidevice
|
||||
// List
|
||||
bytes, err = client.CloudBroker().PCIDevice().ListRaw(context.Background(), pcidevice_cb.ListRequest{})
|
||||
@@ -684,10 +705,19 @@ func TestGetAllPaths(t *testing.T) {
|
||||
|
||||
decortUrls := readUrlFromDir("../../pkg", len(jsonUrls))
|
||||
|
||||
result := getMissingDecortUrls(jsonUrls, decortUrls)
|
||||
if len(result) > 0 {
|
||||
errorText := fmt.Sprintf("Below API handlers (%d in total) need to be added to decort-sdk:\n", len(result))
|
||||
for _, r := range result {
|
||||
missingUrls := getMissingDecortUrls(jsonUrls, decortUrls)
|
||||
if len(missingUrls) > 0 {
|
||||
errorText := fmt.Sprintf("Below API handlers (%d in total) need to be added to decort-sdk:\n", len(missingUrls))
|
||||
for _, r := range missingUrls {
|
||||
errorText += fmt.Sprintln(r)
|
||||
}
|
||||
t.Errorf(errorText)
|
||||
}
|
||||
|
||||
deprecatedUrls := getDeprecatedDecortUrls(jsonUrls, decortUrls)
|
||||
if len(deprecatedUrls) > 0 {
|
||||
errorText := fmt.Sprintf("Below API handlers (%d in total) need to be delete to decort-sdk:\n", len(deprecatedUrls))
|
||||
for _, r := range deprecatedUrls {
|
||||
errorText += fmt.Sprintln(r)
|
||||
}
|
||||
t.Errorf(errorText)
|
||||
|
||||
Reference in New Issue
Block a user