#NEWLINE# def testNewVersion( self ) : #NEWLINE# #INDENT# lvmvg = container . LvmVgStorage ( ) #NEWLINE# stdout1 = testutils . ReadTestData ( 'vgreduce-removemissing-2.02.66-fail.txt' ) #NEWLINE# stdout2 = testutils . ReadTestData ( 'vgreduce-removemissing-2.02.66-ok.txt' ) #NEWLINE# vgs_fail = testutils . ReadTestData ( 'vgs-missing-pvs-2.02.66.txt' ) #NEWLINE# self . run_history = [ ( [ self . VGREDUCE_CMD , '--removemissing' , self . VGNAME ] , utils . RunResult ( 0 , None , stdout1 , '' , '' , None , None ) ) , ( [ self . VGREDUCE_CMD , '--removemissing' , '--force' , self . VGNAME ] , utils . RunResult ( 0 , None , stdout2 , '' , '' , None , None ) ) , ( [ self . LIST_CMD , '--noheadings' , '--nosuffix' , self . VGNAME ] , utils . RunResult ( 0 , None , '' , '' , '' , None , None ) ) ] #NEWLINE# lvmvg . _RemoveMissing ( self . VGNAME , _runcmd_fn = self . _runCmd ) #NEWLINE# self . assertEqual ( self . run_history , [ ] ) #NEWLINE# self . run_history = [ ( [ self . VGREDUCE_CMD , '--removemissing' , self . VGNAME ] , utils . RunResult ( 0 , None , stdout2 , '' , '' , None , None ) ) , ( [ self . LIST_CMD , '--noheadings' , '--nosuffix' , self . VGNAME ] , utils . RunResult ( 0 , None , '' , '' , '' , None , None ) ) ] #NEWLINE# lvmvg . _RemoveMissing ( self . VGNAME , _runcmd_fn = self . _runCmd ) #NEWLINE# self . assertEqual ( self . run_history , [ ] ) #NEWLINE# for ( ecode , out ) in [ ( 1 , '' ) , ( 0 , vgs_fail ) ] : #NEWLINE# #INDENT# self . run_history = [ ( [ self . VGREDUCE_CMD , '--removemissing' , self . VGNAME ] , utils . RunResult ( 0 , None , stdout1 , '' , '' , None , None ) ) , ( [ self . VGREDUCE_CMD , '--removemissing' , '--force' , self . VGNAME ] , utils . RunResult ( 0 , None , stdout2 , '' , '' , None , None ) ) , ( [ self . LIST_CMD , '--noheadings' , '--nosuffix' , self . VGNAME ] , utils . RunResult ( ecode , None , out , '' , '' , None , None ) ) ] #NEWLINE# self . assertRaises ( errors . StorageError , lvmvg . _RemoveMissing , self . VGNAME , _runcmd_fn = self . _runCmd ) #NEWLINE# self . assertEqual ( self . run_history , [ ] )