This commit is contained in:
2026-09-04 17:02:31 +04:00
parent b3fccfb000
commit 71b53b743d
25 changed files with 440 additions and 102 deletions

View File

@@ -6,6 +6,7 @@ import (
"testing"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/account"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/audit"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/bservice"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/compute"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/disks"
@@ -96,6 +97,26 @@ func TestGetListCloudAPI(t *testing.T) {
t.Errorf("Can not test Account get because account list is empty")
}
// Audit
// List
bytes, err = client.CloudAPI().Audit().ListRaw(context.Background(), audit.ListRequest{})
if err != nil {
t.Error(err)
}
getResult("Audit list", bytes, audit.ListAudits{}, t)
// Get
listAudits, _ := client.CloudAPI().Audit().List(context.Background(), audit.ListRequest{})
if len(listAudits.Data) > 0 {
id := listAudits.Data[0].GUID
bytes, err = client.CloudAPI().Audit().GetRaw(context.Background(), audit.GetRequest{AuditGuid: id})
if err != nil {
t.Error(err)
}
getResult("Audit get", bytes, audit.RecordAudit{}, t)
} else {
t.Errorf("Can not test Audit get because Audit list is empty")
}
// Bservice
// List
bytes, err = client.CloudAPI().BService().ListRaw(context.Background(), bservice.ListRequest{})