This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git


The following commit(s) were added to refs/heads/main by this push:
     new 0f77353  Cleanup tests (#18)
0f77353 is described below

commit 0f7735386b1b9fc2863f5c4f355c4ca8d468af9d
Author: davidjumani <[email protected]>
AuthorDate: Wed Oct 20 14:15:52 2021 +0530

    Cleanup tests (#18)
---
 cloudstack/CertificateService_test.go     | 2 +-
 cloudstack/ClusterService_test.go         | 1 -
 cloudstack/ConfigurationService_test.go   | 2 +-
 cloudstack/DomainService_test.go          | 3 +--
 cloudstack/ImageStoreService_test.go      | 2 +-
 cloudstack/NetworkOfferingService_test.go | 2 +-
 cloudstack/NetworkService_test.go         | 2 +-
 cloudstack/PoolService_test.go            | 2 +-
 cloudstack/ServiceOfferingService_test.go | 2 +-
 cloudstack/UserService_test.go            | 4 ++--
 cloudstack/VLANService_test.go            | 2 +-
 cloudstack/cloudstack_test.go             | 1 -
 12 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/cloudstack/CertificateService_test.go 
b/cloudstack/CertificateService_test.go
index 3c781ec..7402a06 100644
--- a/cloudstack/CertificateService_test.go
+++ b/cloudstack/CertificateService_test.go
@@ -50,7 +50,7 @@ func TestUploadCustomCertificate(t *testing.T) {
        }
 
        if resp.Jobstatus == 1 {
-               fmt.Println("Successfully uploaded certificate")
+               t.Log("Successfully uploaded certificate")
        }
 
 }
diff --git a/cloudstack/ClusterService_test.go 
b/cloudstack/ClusterService_test.go
index 914a5fc..68feed2 100644
--- a/cloudstack/ClusterService_test.go
+++ b/cloudstack/ClusterService_test.go
@@ -255,7 +255,6 @@ func TestClusterService_UpdateCluster(t *testing.T) {
                t.Errorf("Failed to updated cluster details - name, due to: 
%v", err)
        }
 
-       fmt.Println(resp)
        if resp.Name != "TestClusterUpdated" {
                t.Errorf("Failed to updated cluster name")
        }
diff --git a/cloudstack/ConfigurationService_test.go 
b/cloudstack/ConfigurationService_test.go
index 50099df..70518ed 100644
--- a/cloudstack/ConfigurationService_test.go
+++ b/cloudstack/ConfigurationService_test.go
@@ -86,7 +86,7 @@ func TestConfigurationService_UpdateConfigurations(t 
*testing.T) {
        if err != nil {
                t.Errorf("Failed to update configuration due to: %v", err)
        }
-       fmt.Println(resp)
+
        if resp.Value != "false" {
                t.Errorf("Failed to update configuration")
        }
diff --git a/cloudstack/DomainService_test.go b/cloudstack/DomainService_test.go
index 8bbd178..0c34364 100644
--- a/cloudstack/DomainService_test.go
+++ b/cloudstack/DomainService_test.go
@@ -43,7 +43,7 @@ func TestDomainService_CreateDomain(t *testing.T) {
        if err != nil {
                t.Errorf("Failed to create domain due to: %v", err)
        }
-       fmt.Println(resp)
+
        if resp.Name != "testDomain" {
                t.Errorf("Failed to create domain")
        }
@@ -67,7 +67,6 @@ func TestDomainService_UpdateDomain(t *testing.T) {
                t.Errorf("Failed to update domain name due to: %v", err)
        }
 
-       fmt.Println(resp)
        if resp.Name != "testDomainUpdated" {
                t.Errorf("Failed to update domain name")
        }
diff --git a/cloudstack/ImageStoreService_test.go 
b/cloudstack/ImageStoreService_test.go
index 2f6102f..3c82e5f 100644
--- a/cloudstack/ImageStoreService_test.go
+++ b/cloudstack/ImageStoreService_test.go
@@ -43,7 +43,7 @@ func TestImageStoreService_AddImageStore(t *testing.T) {
                t.Errorf("Failed to add image store due to: %v", err)
                return
        }
-       fmt.Println(resp)
+
        if resp == nil || resp.Providername != "NFS" {
                t.Errorf(" Failed to add image store")
        }
diff --git a/cloudstack/NetworkOfferingService_test.go 
b/cloudstack/NetworkOfferingService_test.go
index b80611b..18ddf4e 100644
--- a/cloudstack/NetworkOfferingService_test.go
+++ b/cloudstack/NetworkOfferingService_test.go
@@ -64,7 +64,7 @@ func TestNetworkOfferingService_UpdateNetworkOffering(t 
*testing.T) {
        if err != nil {
                t.Errorf("Failed to update network offering state due to: %v", 
err)
        }
-       fmt.Println(resp)
+
        if resp.State != "Enabled" {
                t.Errorf("Failed to enable network offering")
        }
diff --git a/cloudstack/NetworkService_test.go 
b/cloudstack/NetworkService_test.go
index edf4b48..faf21f1 100644
--- a/cloudstack/NetworkService_test.go
+++ b/cloudstack/NetworkService_test.go
@@ -79,7 +79,7 @@ func TestNetworkService_DeleteNetwork(t *testing.T) {
                if err != nil {
                        t.Errorf("Failed to parse response, due to: %v", err)
                }
-               fmt.Println(response)
+
                fmt.Fprintf(writer, response)
        }))
        defer server.Close()
diff --git a/cloudstack/PoolService_test.go b/cloudstack/PoolService_test.go
index 8636e8d..c0f8993 100644
--- a/cloudstack/PoolService_test.go
+++ b/cloudstack/PoolService_test.go
@@ -43,7 +43,7 @@ func TestPoolService_CreateStoragePool(t *testing.T) {
                t.Errorf("Failed to create storage pool due to %v", err)
                return
        }
-       fmt.Println(resp)
+
        if resp == nil || resp.Name != "testPrimary1" {
                t.Errorf("Failed to create storage pool")
        }
diff --git a/cloudstack/ServiceOfferingService_test.go 
b/cloudstack/ServiceOfferingService_test.go
index 448b336..0fa4a48 100644
--- a/cloudstack/ServiceOfferingService_test.go
+++ b/cloudstack/ServiceOfferingService_test.go
@@ -68,7 +68,7 @@ func TestServiceOfferingService_UpdateServiceOffering(t 
*testing.T) {
                t.Errorf("Failed to update service offering due to %v", err)
                return
        }
-       fmt.Println(resp)
+
        if resp == nil || resp.Name != "testServiceOfferingUpdated" {
                t.Errorf("Failed to create service offering name")
        }
diff --git a/cloudstack/UserService_test.go b/cloudstack/UserService_test.go
index 919eab8..79a5df1 100644
--- a/cloudstack/UserService_test.go
+++ b/cloudstack/UserService_test.go
@@ -66,7 +66,7 @@ func TestUserService_EnableUser(t *testing.T) {
                t.Errorf("Failed to enable user due to %v", err)
                return
        }
-       fmt.Println(resp)
+
        if resp == nil || resp.State != "enabled" {
                t.Errorf("Failed to enable user")
        }
@@ -136,7 +136,7 @@ func TestUserService_LockUser(t *testing.T) {
                t.Errorf("Failed to lock user due to %v", err)
                return
        }
-       fmt.Println(resp)
+
        if resp == nil || resp.State != "locked" {
                t.Errorf("Failed to lock user")
        }
diff --git a/cloudstack/VLANService_test.go b/cloudstack/VLANService_test.go
index 22ea41f..82711a3 100644
--- a/cloudstack/VLANService_test.go
+++ b/cloudstack/VLANService_test.go
@@ -45,7 +45,7 @@ func TestNetworkService_DedicateGuestVLANRange(t *testing.T) {
                t.Errorf("Failed to dedicate guest VLAN range for physical 
network due to: %v", err)
                return
        }
-       fmt.Println(resp)
+
        if resp == nil || resp.Guestvlanrange != "100-110" {
                t.Errorf("Failed to dedicate guest VLAN range for physical 
network")
        }
diff --git a/cloudstack/cloudstack_test.go b/cloudstack/cloudstack_test.go
index c32dc8f..8f0b246 100644
--- a/cloudstack/cloudstack_test.go
+++ b/cloudstack/cloudstack_test.go
@@ -47,7 +47,6 @@ func ReadData(apiName string, testDataFile string) 
(map[string]string, error) {
        jsonBytes, err := json.Marshal(data.(map[string]interface{})[apiName])
 
        if err != nil {
-               // fmt.Println(err)
                return nil, err
        }
        response := make(map[string]string)

Reply via email to