#NEWLINE# def test_some_missing( self ) : #NEWLINE# #INDENT# "Test that 'rm -a' fails when some but not all uris don't exist." #NEWLINE# bucket_uri = self . CreateVersionedBucket ( ) #NEWLINE# key_uri = bucket_uri . clone_replace_name ( 'foo' ) #NEWLINE# key_uri . set_contents_from_string ( 'bar' ) #NEWLINE# self . AssertNObjectsInBucket ( bucket_uri , 1 , versioned = True ) #NEWLINE# stderr = self . RunGsUtil ( [ 'rm' , '-a' , suri ( key_uri ) , ( '%s' % suri ( bucket_uri , 'missing' ) ) ] , return_stderr = True , expected_status = 1 ) #NEWLINE# self . assertEqual ( stderr . count ( ( 'Removing %s://' % self . default_provider ) ) , 1 ) #NEWLINE# self . assertIn ( ( NO_URLS_MATCHED_TARGET % suri ( bucket_uri , 'missing' ) ) , stderr )