Skip to content
Permalink
Browse files
Cleanup tests (#18)
  • Loading branch information
davidjumani committed Oct 20, 2021
1 parent 78fa5e4 commit 0f7735386b1b9fc2863f5c4f355c4ca8d468af9d
Showing 12 changed files with 11 additions and 14 deletions.
@@ -50,7 +50,7 @@ func TestUploadCustomCertificate(t *testing.T) {
}

if resp.Jobstatus == 1 {
fmt.Println("Successfully uploaded certificate")
t.Log("Successfully uploaded certificate")
}

}
@@ -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")
}
@@ -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")
}
@@ -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")
}
@@ -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")
}
@@ -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")
}
@@ -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()
@@ -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")
}
@@ -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")
}
@@ -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")
}
@@ -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")
}
@@ -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)

0 comments on commit 0f77353

Please sign in to comment.