v1.16.2
This commit is contained in:
@@ -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{})
|
||||
|
||||
Reference in New Issue
Block a user