#NEWLINE# def test_ca_must_exist( self ) : #NEWLINE# #INDENT# '\n        A ``UsageError`` is raised if the specified ``cacert`` cluster\n        certificate does not exist.\n        ' #NEWLINE# app = self . mktemp ( ) #NEWLINE# FilePath ( app ) . touch ( ) #NEWLINE# deploy = self . mktemp ( ) #NEWLINE# FilePath ( deploy ) . touch ( ) #NEWLINE# credential_path = b'/path/to/non-existent-cluster.crt' #NEWLINE# self . options [ 'cacert' ] = credential_path #NEWLINE# exception = self . assertRaises ( UsageError , self . options . parseOptions , [ CONTROL_HOST , deploy , app ] ) #NEWLINE# expected_message = 'File /path/to/non-existent-cluster.crt does not exist. Use the flocker-ca command to create the credential, or use the --cacert flag to specify the credential location.' #NEWLINE# self . assertEqual ( expected_message , str ( exception ) )