示例#1
0
 def test_check_volume_state_creating(self):
     """Test the appropriate error for still creating volumes."""
     mock_volume = helper.generate_mock_volume(state='creating')
     with self.assertRaises(AwsVolumeNotReadyError):
         ec2.check_volume_state(mock_volume)
示例#2
0
 def test_check_volume_state_error(self):
     """Test the appropriate error for other volume states."""
     mock_volume = helper.generate_mock_volume(state='error')
     with self.assertRaises(AwsVolumeError):
         ec2.check_volume_state(mock_volume)
示例#3
0
 def test_check_volume_state_available(self):
     """Test that a volue is available."""
     mock_volume = helper.generate_mock_volume(state='available')
     self.assertIsNone(ec2.check_volume_state(mock_volume))