Improved test suite for self heal feature #1361
Conversation
Can one of the admins verify this patch? |
add to whitelist |
e2e/glustershd_test.go
Outdated
} | ||
} | ||
|
||
f1, err := os.OpenFile(mntPath+"/file1.txt", os.O_RDWR, 0777) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why permission is 0777
?
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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])) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
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>
0d74fb4
to
683e20c
Compare
Improved test suite for heal process.
Signed-off-by: Vishal Pandey vpandey@redhat.com