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

Commit

Permalink
Add basic test to delete a volume with container running
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 14, 2017
1 parent e840a5f commit 7762f3f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/e2e/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ var _ = Suite(&BasicTestSuite{})
// 2. Verify the volume is available
// 3. Attach the volume
// 4. Verify volume status is attached
// 5. Remove the container
// 6. Verify volume status is detached
// 7. Remove the volume
// 8. Verify the volume is unavailable
// 5. Remove the volume (expect fail)
// 6. Remove the container
// 7. Verify volume status is detached
// 8. Remove the volume
// 9. Verify the volume is unavailable
func (s *BasicTestSuite) TestVolumeLifecycle(c *C) {
log.Printf("START: basic-test.TestVolumeLifecycle")

Expand All @@ -80,6 +81,9 @@ func (s *BasicTestSuite) TestVolumeLifecycle(c *C) {
status := verification.VerifyAttachedStatus(s.volumeName, host, s.esxName)
c.Assert(status, Equals, true, Commentf("Volume %s is not attached", s.volumeName))

out, err = dockercli.DeleteVolume(host, s.volumeName)
c.Assert(err, Not(IsNil), Commentf(out))

out, err = dockercli.RemoveContainer(host, s.containerName)
c.Assert(err, IsNil, Commentf(out))

Expand Down

0 comments on commit 7762f3f

Please sign in to comment.