Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Improved test suite for self heal feature #1361

Merged
merged 2 commits into from Dec 7, 2018

Conversation

vpandey-RH
Copy link
Contributor

Improved test suite for heal process.

Signed-off-by: Vishal Pandey vpandey@redhat.com

@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@ghost ghost assigned vpandey-RH Dec 4, 2018
@ghost ghost added the in progress label Dec 4, 2018
@aravindavk
Copy link
Member

add to whitelist

}
}

f1, err := os.OpenFile(mntPath+"/file1.txt", os.O_RDWR, 0777)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why permission is 0777?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to Write only permissions.

for brick := range getBricksStatus {
if getBricksStatus[brick].Info.PeerID.String() == tc.gds[0].PeerID() {
process, err := os.FindProcess(getBricksStatus[brick].Pid)
r.Nil(err, fmt.Sprintf("failed to find bricks pid: %s", err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test will be silently ignored if condition in line 75 is not satisfied. Add a test before for loop to check required number of BricksStatus with gds[0].PeerID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


for node := range healInfo {
if healInfo[node].Status == "Connected" {
r.NotNil(checkForPendingHeals(&healInfo[node]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Add a test to see required number of nodes are in connected state

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

r.Nil(err)
for node := range healInfo {
if healInfo[node].Status == "Connected" {
r.Nil(checkForPendingHeals(&healInfo[node]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Vishal Pandey <vpandey@redhat.com>
@ghost ghost assigned Madhu-1 Dec 7, 2018
@Madhu-1 Madhu-1 merged commit a84850d into gluster:master Dec 7, 2018
@ghost ghost removed the in progress label Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants