Pearl1594 opened a new pull request #11:
URL: https://github.com/apache/cloudstack-go/pull/11
This PR adds the following:
- Adds tests for the various ACS Services
- Fixes to generate.go script to enable parsing of certain API responses,
which include:
- AddImageStore
- CreateDomain
- UpdateDomain
- CreateStoragePool
- UpdateNetworkOffering
- UpdateServiceOffering
- DedicateGuestVlanRange
- EnableUser
- LockUser
Output of Test Run:
```
=== RUN TestListAccounts
--- PASS: TestListAccounts (0.00s)
=== RUN TestCreateAccounts
--- PASS: TestCreateAccounts (0.00s)
=== RUN TestAssociateIpAddress
--- PASS: TestAssociateIpAddress (0.00s)
=== RUN TestDisassociateIpAddress
--- PASS: TestDisassociateIpAddress (0.00s)
=== RUN TestCreateAffinityGroup
--- PASS: TestCreateAffinityGroup (0.00s)
=== RUN TestListApis_SetName
--- PASS: TestListApis_SetName (0.00s)
=== RUN TestListAsyncJobs
--- PASS: TestListAsyncJobs (0.00s)
=== RUN TestAuthenticationService_Login
--- PASS: TestAuthenticationService_Login (0.00s)
=== RUN TestAuthenticationService_Logout
--- PASS: TestAuthenticationService_Logout (0.00s)
=== RUN TestUploadCustomCertificate
--- PASS: TestUploadCustomCertificate (0.00s)
=== RUN TestClusterService_ListClusters
--- PASS: TestClusterService_ListClusters (0.00s)
=== RUN TestClusterService_DisableHAForCluster
--- PASS: TestClusterService_DisableHAForCluster (0.00s)
=== RUN TestClusterService_EnableHAForCluster
--- PASS: TestClusterService_EnableHAForCluster (0.00s)
=== RUN TestClusterService_DisableOutOfBandManagementForCluster
--- PASS: TestClusterService_DisableOutOfBandManagementForCluster (0.00s)
=== RUN TestClusterService_EnableOutOfBandManagementForCluster
--- PASS: TestClusterService_EnableOutOfBandManagementForCluster (0.00s)
=== RUN TestClusterService_DedicateCluster
--- PASS: TestClusterService_DedicateCluster (0.00s)
=== RUN TestClusterService_ReleaseDedicatedCluster
--- PASS: TestClusterService_ReleaseDedicatedCluster (0.00s)
=== RUN TestClusterService_DeleteCluster
--- PASS: TestClusterService_DeleteCluster (0.00s)
=== RUN TestConfigurationService_ListCapabilities
--- PASS: TestConfigurationService_ListCapabilities (0.00s)
=== RUN TestConfigurationService_ListConfigurations
--- PASS: TestConfigurationService_ListConfigurations (0.00s)
=== RUN TestDiskOfferingService_CreateDiskOffering
--- PASS: TestDiskOfferingService_CreateDiskOffering (0.00s)
=== RUN TestDiskOfferingService_ListDiskOffering
--- PASS: TestDiskOfferingService_ListDiskOffering (0.00s)
=== RUN TestDiskOfferingService_DeleteDiskOffering
--- PASS: TestDiskOfferingService_DeleteDiskOffering (0.00s)
=== RUN TestDomainService_CreateDomain
&{ 0 false 1530cc8c-efe7-4dff-84c4-96a1e8a1cd7a 0 0 1 0 testDomain
0 e4874e10-5fdf-11ea-9a56-1e006800018c ROOT ROOT/testDomain 0 0 0 0
0 0 0 0}
--- PASS: TestDomainService_CreateDomain (0.00s)
=== RUN TestDomainService_UpdateDomain
&{ 0 false ee05fd92-7365-4421-a15b-abfa11dfc4f6 0 0 1 0
testDomainUpdated 0 e4874e10-5fdf-11ea-9a56-1e006800018c ROOT
ROOT/testDomainUpdated 0 0 0 0 0 0 0 0}
--- PASS: TestDomainService_UpdateDomain (0.00s)
=== RUN TestDomainService_ListDomains
--- PASS: TestDomainService_ListDomains (0.00s)
=== RUN TestDomainService_ListDomainChildren
--- PASS: TestDomainService_ListDomainChildren (0.00s)
=== RUN TestDomainService_DeleteDomain
--- PASS: TestDomainService_DeleteDomain (0.00s)
=== RUN TestFirewallService_CreateFirewallRule
--- PASS: TestFirewallService_CreateFirewallRule (0.00s)
=== RUN TestFirewallService_DeleteFirewallRule
--- PASS: TestFirewallService_DeleteFirewallRule (0.00s)
=== RUN TestFirewallService_CreateEgressFirewallRule
--- PASS: TestFirewallService_CreateEgressFirewallRule (0.00s)
=== RUN TestFirewallService_DeleteEgressFirewallRule
--- PASS: TestFirewallService_DeleteEgressFirewallRule (0.00s)
=== RUN TestHostService_AddHost
--- PASS: TestHostService_AddHost (0.00s)
=== RUN TestHostService_ListHosts
--- PASS: TestHostService_ListHosts (0.00s)
=== RUN TestHostService_PrepareHostForMaintenance
--- PASS: TestHostService_PrepareHostForMaintenance (0.00s)
=== RUN TestHostService_CancelHostForMaintenance
--- PASS: TestHostService_CancelHostForMaintenance (0.00s)
=== RUN TestHostService_EnableOutOfBandManagementForHost
--- PASS: TestHostService_EnableOutOfBandManagementForHost (0.00s)
=== RUN TestHostService_DisableOutOfBandManagementForHost
--- PASS: TestHostService_DisableOutOfBandManagementForHost (0.00s)
=== RUN TestHostService_EnableHAForHost
--- PASS: TestHostService_EnableHAForHost (0.00s)
=== RUN TestHypervisorService_ListSpecificHypervisorCapabilities
--- PASS: TestHypervisorService_ListSpecificHypervisorCapabilities (0.00s)
=== RUN TestISOService_RegisterIso
--- PASS: TestISOService_RegisterIso (0.00s)
=== RUN TestImageStoreService_AddImageStore
&{0 0 0ac85364-e31a-4840-97a4-a237b4291dfa 0
nfs://192.168.0.20/export/testing/secondary nfs NFS false ZONE
nfs://192.168.0.20/export/testing/secondary
04ccc336-d730-42fe-8ff6-5ae36e141e81 SimZone1}
--- PASS: TestImageStoreService_AddImageStore (0.00s)
=== RUN TestImageStoreService_ListImageStores
--- PASS: TestImageStoreService_ListImageStores (0.00s)
=== RUN TestImageStoreService_DeleteImageStore
--- PASS: TestImageStoreService_DeleteImageStore (0.00s)
=== RUN TestLoadBalancerService_CreateLoadBalancerRule
--- PASS: TestLoadBalancerService_CreateLoadBalancerRule (0.00s)
=== RUN TestLoadBalancerService_AssignLoadBalancerRule
--- PASS: TestLoadBalancerService_AssignLoadBalancerRule (0.00s)
=== RUN TestNetworkOfferingService_CreateNetworkOffering
--- PASS: TestNetworkOfferingService_CreateNetworkOffering (0.00s)
=== RUN TestNetworkOfferingService_UpdateNetworkOffering
&{Optional true map[] testNetOffering true false L2
c2000683-68fd-437e-a4cf-f3676e1d18c1 false false 0 0 testNetOffering 200 []
c4b50796-22a5-4347-ae81-79911e44ac8d false true Enabled false false Guest }
--- PASS: TestNetworkOfferingService_UpdateNetworkOffering (0.00s)
=== RUN TestNetworkOfferingService_ListNetworkOffering
--- PASS: TestNetworkOfferingService_ListNetworkOffering (0.00s)
=== RUN TestNetworkOfferingService_DeleteNetworkOffering
--- PASS: TestNetworkOfferingService_DeleteNetworkOffering (0.00s)
=== RUN TestNetworkService_CreateNetwork
--- PASS: TestNetworkService_CreateNetwork (0.00s)
=== RUN TestNetworkService_ListNetworks
--- PASS: TestNetworkService_ListNetworks (0.00s)
=== RUN TestNetworkService_DeleteNetwork
--- PASS: TestNetworkService_DeleteNetwork (0.00s)
=== RUN TestNetworkService_CreatePhysicalNetwork
--- PASS: TestNetworkService_CreatePhysicalNetwork (0.00s)
=== RUN TestPoolService_CreateStoragePool
&{0 0 a73fb4a4-642b-4ea4-92b8-b74ec8908534 TestCluster
2021-10-04T08:17:38+0000 0 1099511627776 0
3fd44942-4881-3fb0-95f1-5d7b7ae64cfb 10.1.1.2 0 testPrimary1 2.0
/export/primary1 6a1dbf48-8b8e-45ab-8249-cf43a86f012d TestPod DefaultPrimary
CLUSTER Up map[] false NetworkFilesystem 6ebc7a1c-ff98-425c-ac0d-b6c2e3ae6e33
TestZone}
--- PASS: TestPoolService_CreateStoragePool (0.00s)
=== RUN TestPoolService_ListStoragePools
--- PASS: TestPoolService_ListStoragePools (0.00s)
=== RUN TestPoolService_DeleteStoragePool
--- PASS: TestPoolService_DeleteStoragePool (0.00s)
=== RUN TestProjectService_CreateProject
--- PASS: TestProjectService_CreateProject (0.00s)
=== RUN TestProjectService_ActivateProject
--- PASS: TestProjectService_ActivateProject (0.00s)
=== RUN TestProjectService_SuspendProject
--- PASS: TestProjectService_SuspendProject (0.00s)
=== RUN TestProjectService_UpdateProject
--- PASS: TestProjectService_UpdateProject (0.00s)
=== RUN TestResourcetagsService_CreateTags
--- PASS: TestResourcetagsService_CreateTags (0.00s)
=== RUN TestResourcetagsService_DeleteTags
--- PASS: TestResourcetagsService_DeleteTags (0.00s)
=== RUN TestSSHService_CreateSSHKeyPair
--- PASS: TestSSHService_CreateSSHKeyPair (0.00s)
=== RUN TestSSHService_ListSSHKeyPairs
--- PASS: TestSSHService_ListSSHKeyPairs (0.00s)
=== RUN TestSSHService_ResetSSHKeyForVirtualMachine
--- PASS: TestSSHService_ResetSSHKeyForVirtualMachine (0.00s)
=== RUN TestSSHService_DeleteSSHKeyPair
--- PASS: TestSSHService_DeleteSSHKeyPair (0.00s)
=== RUN TestServiceOfferingService_CreateServiceOffering
--- PASS: TestServiceOfferingService_CreateServiceOffering (0.00s)
=== RUN TestServiceOfferingService_UpdateServiceOffering
&{none 2 1000 2021-10-04T07:16:42+0000 false 0 0 0 0 0 0 0 0 0 0 0 0
testServiceOffering 0 efaeeab0-4b09-4729-8b6f-62645db41b37 false false false
false 0 false 0 2048 0 testServiceOfferingUpdated 0 false thin 0 map[] shared
}
--- PASS: TestServiceOfferingService_UpdateServiceOffering (0.00s)
=== RUN TestServiceOfferingService_DeleteServiceOffering
--- PASS: TestServiceOfferingService_DeleteServiceOffering (0.00s)
=== RUN TestStoragePoolService_CancelStorageMaintenance
--- PASS: TestStoragePoolService_CancelStorageMaintenance (0.00s)
=== RUN TestStoragePoolService_EnableStorageMaintenance
--- PASS: TestStoragePoolService_EnableStorageMaintenance (0.00s)
=== RUN TestTemplateService_RegisterTemplate
--- PASS: TestTemplateService_RegisterTemplate (0.00s)
=== RUN TestTemplateService_CreateTemplate
--- PASS: TestTemplateService_CreateTemplate (0.00s)
=== RUN TestTemplateService_ExtractTemplate
--- PASS: TestTemplateService_ExtractTemplate (0.00s)
=== RUN TestUserService_CreateUser
--- PASS: TestUserService_CreateUser (0.00s)
=== RUN TestUserService_EnableUser
&{admin 27ef5ba2-5fe0-11ea-9a56-1e006800018c 1 2021-10-04T08:57:35+0000
ROOT e4874e10-5fdf-11ea-9a56-1e006800018c [email protected] firstname
cd2b5afa-db4d-4532-88ec-1356a273e534 false false 0 lastname
16919363-5fe0-11ea-9a56-1e006800018c Root Admin Admin enabled dummyUser
native}
--- PASS: TestUserService_EnableUser (0.00s)
=== RUN TestUserService_DisableUser
--- PASS: TestUserService_DisableUser (0.00s)
=== RUN TestUserService_ListUser
--- PASS: TestUserService_ListUser (0.00s)
=== RUN TestUserService_LockUser
&{kittycat 2841efe4-aba4-4abf-bfdc-c6d0825c29a6 0 2020-06-26T18:21:57+0000
saml 1d4a08f6-5c37-4385-9d95-fa4e654ecf4e [email protected] Ashley
3b7325b3-849c-4314-ad19-dd3c483b6d1a false false 0 Cat
1691ce2c-5fe0-11ea-9a56-1e006800018c User User locked IST ashley saml2disabled}
--- PASS: TestUserService_LockUser (0.00s)
=== RUN TestUserService_DeleteUser
--- PASS: TestUserService_DeleteUser (0.00s)
=== RUN TestNetworkService_DedicateGuestVLANRange
&{admin ROOT e4874e10-5fdf-11ea-9a56-1e006800018c 100-110
b1afc5fe-b17c-4db3-8411-c323e4997ead 0 200 1}
--- PASS: TestNetworkService_DedicateGuestVLANRange (0.00s)
=== RUN TestVirtualMachineService_DeployVirtualMachine
--- PASS: TestVirtualMachineService_DeployVirtualMachine (0.00s)
=== RUN TestVirtualMachineService_AddNicToVirtualMachine
--- PASS: TestVirtualMachineService_AddNicToVirtualMachine (0.00s)
=== RUN TestCreateAsyncClient
--- PASS: TestCreateAsyncClient (0.00s)
=== RUN TestCreateSyncClient
--- PASS: TestCreateSyncClient (0.00s)
PASS
ok github.com/apache/cloudstack-go/v2/cloudstack 0.037s
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]