[ 
https://issues.apache.org/jira/browse/DTACLOUD-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dies Koper reopened DTACLOUD-442:
---------------------------------


The test which was the focus of this issue is named 'should allow to snapshot 
running instance if supported by provider'.
As it didn't check whether the instance was running, and didn't start the 
instance, for fgcp and rhevm it tried to create an image of a stopped instance. 
As I believed that was not the intend of the test (and meant that for those two 
providers it didn't test what would happen if you tried to create a snapshot of 
a running instance), my fix was to ensure the instance was started (by starting 
it and double-checking its state was RUNNING).

This uncovered DTACLOUD-452. But Ronelle pointed out in that jira:

This essential difference is that RHEVM instances are created in a stopped 
state - which was the state need to test the 'create_image' functionality. 
Noting now that the test starts all instances, need to reconsider this test 
case. The bug reported here not withstanding, it may be better to:

 - if no 'create_image' action was found on the instance in a running state
 - stop the instance and then check for the create_image action

As things stand, we loose test coverage by skipping the test point for all 
providers where the action is available for stopped instances.

==============
So re-opening this jira to reconsider the test case.

                
> Fgcp: api instances test 'should allow to snapshot running instance if 
> supported by provider' is run even though provider does not support it
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-442
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-442
>             Project: DeltaCloud
>          Issue Type: Test
>          Components: Server
>         Environment: Fgcp driver
>            Reporter: Dies Koper
>            Assignee: Dies Koper
>            Priority: Minor
>
> When running DC api tests (rake tests:deltacloud in root tests folder), the 
> 'should allow to snapshot running instance if supported by provider' test is 
> not skipped; it fails.
> The FGCP doesn't not support creating snapshots from running instances. It 
> does support creating images from stopped instances.
> This test checks whether 'create_image' is set on the test server and if 
> true, runs the test.
> However, it doesn't check whether the server is running, and the server is 
> never explicitly started after creation.
> With the Fgcp, an newly created instance transitions from PENDING to STOPPED, 
> hence the misunderstanding.
> Suggesting to add code to ensure the instance is running before checking the 
> create_image flag.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to