Advertisement
j_melis

Untitled

Mar 15th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.84 KB | None | 0 0
  1.     it "should have the correct save/clone tags and user/rdy states" do
  2.         @vm['TEMPLATE/DISK/SAVE'].should eq("YES")
  3.         @vm['TEMPLATE/DISK/CLONE'].should eq("NO")
  4.  
  5.         @image = cli_action_xml("oneimage show -x #{@image_id}")
  6.         @image['PERSISTENT'].should eq("1")
  7.         @image['RUNNING_VMS'].should eq("1")
  8.         @image['STATE'].should eq("2")
  9.  
  10.         cli_action("onevm delete #{@vm_id}")
  11.         check_vm_state("DONE", 10, @vm_id)
  12.     end
  13.  
  14.     it "should update on shutdown" do
  15.         image_info_before = file_info(@image['SOURCE'])
  16.         cli_action("onevm shutdown #{@vm_id}")
  17.         check_vm_state("DONE", 10, @vm_id)
  18.         image_info_after = file_info(@image['SOURCE'])
  19.         image_info_before.should_not eql(image_info_after)
  20.  
  21.         File.read(@image['SOURCE']).strip.should eql(@timestamp)
  22.     end
  23. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement