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

Add a failover e2e test #1431

Merged
merged 4 commits into from
Jun 17, 2017
Merged

Add a failover e2e test #1431

merged 4 commits into from
Jun 17, 2017

Conversation

shaominchen
Copy link
Contributor

@shaominchen shaominchen commented Jun 16, 2017

Added a new failover e2e test and also refactored existing test cases.

Fixes issue #1379

Testing Done:

=> Running target e2e-test-runalways Wed Jun 7 18:49:10 UTC 2017
--- PASS: Test (194.08s)
PASS
OK: 6 passed

=> Running target e2e-test-runonce Wed Jun 7 18:52:27 UTC 2017
--- PASS: Test (540.44s)
PASS
OK: 18 passed

Copy link
Contributor

@pshahzeb pshahzeb left a comment

Choose a reason for hiding this comment

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

Overall looks good.
I have 2 comments

// 2. Setup: Attach it to a container
// 3. Kill the VM
// 4. Verification: volume status should be detached
// 5. Attach it to a different container
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be attach to a container on different VM.
Thats what it looks like from line 157

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will update the comments.

// Power on VM
govc.PowerOnVM(s.vm1Name)
isStatusChanged := misc.WaitForExpectedState(govc.GetVMPowerState, s.vm1Name, properties.PowerOnState)
c.Assert(isStatusChanged, Equals, true, Commentf("VM [%s] should be powered on state", s.vm1Name))
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't part of original test steps but I think it would be a good idea to add a check here (after L172) to ensure that status of the volume in detached. The reason being that container from VM2 is removed and VM1 has come up too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add.

Copy link
Contributor Author

@shaominchen shaominchen Jun 16, 2017

Choose a reason for hiding this comment

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

With this change, I think the existing TestKillVM can be removed. What do you think? @pshahzeb

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree that there is an overlap. I had a discussion with @shuklanirdesh82 in such cases. We should have it for now since we do not want to miss any bug in any of the possible permutation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's a permutation in the current case. Anyway, I will keep it for now.

Copy link
Contributor

@lipingxue lipingxue left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@shuklanirdesh82 shuklanirdesh82 left a comment

Choose a reason for hiding this comment

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

LGTM

@shaominchen shaominchen merged commit da10f8c into master Jun 17, 2017
@shaominchen shaominchen deleted the failover_test branch June 17, 2017 00:31
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants