#NEWLINE# def test_wo_image( self ) : #NEWLINE# #INDENT# img1 = self . _create_tar ( { #NEWLINE# #INDENT# 'file1' : BytesIO ( b'a' ) , #NEWLINE# 'file2' : BytesIO ( b'b' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# img1_dev = ( '/dev/1.%s' % os . path . basename ( img1 ) ) #NEWLINE# opts = ( '--zvm-image=%s,/,wo' % img1 ) #NEWLINE# self . argv = [ ZVSH ] #NEWLINE# self . argv . extend ( opts . split ( ) ) #NEWLINE# self . argv . append ( self . program ) #NEWLINE# cmd_line = self . program #NEWLINE# shell = Shell ( self . argv ) #NEWLINE# try : #NEWLINE# #INDENT# with pytest . raises ( SystemExit ) : #NEWLINE# #INDENT# shell . run ( ) #NEWLINE# #UNINDENT# files = os . listdir ( shell . zvsh . tmpdir ) #NEWLINE# self . assertTrue ( ( 'manifest.1' in files ) ) #NEWLINE# self . assertTrue ( ( 'nvram.1' in files ) ) #NEWLINE# manifest = _read_manifest ( join_path ( shell . zvsh . tmpdir , 'manifest.1' ) ) #NEWLINE# reference = self . _reference_manifest ( shell . zvsh . tmpdir ) #NEWLINE# channels = reference [ 'channel' ] #NEWLINE# img1_chan = [ os . path . abspath ( img1 ) , img1_dev , '3' , '0' , str ( DEFAULT_LIMITS [ 'reads' ] ) , str ( DEFAULT_LIMITS [ 'rbytes' ] ) , str ( DEFAULT_LIMITS [ 'writes' ] ) , str ( DEFAULT_LIMITS [ 'wbytes' ] ) ] #NEWLINE# channels . insert ( 3 , img1_chan ) #NEWLINE# self . assertEqual ( manifest , reference ) #NEWLINE# nvram = _read_nvram ( join_path ( shell . zvsh . tmpdir , 'nvram.1' ) ) #NEWLINE# reference = _reference_nvram ( cmd_line , images = [ ( img1_dev , '/' , 'wo' , 'no' ) ] ) #NEWLINE# self . assertEqual ( nvram , reference ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# shell . zvsh . orig_cleanup ( )