'Test for ``flocker-ca create-node-certificate`` command.
Runs ``flocker-ca initialize`` followed by
``flocker-ca create-node-certificate` and calls ``openssl``
to verify the generated node certificate and private key is
signed by the previously generated certificate authority.'

def test_node_certificate(self):

    (_, output) = flocker_ca('create-node-certificate', cwd=self.temp_path.path)
    file_pattern = re.compile('([a-zA-Z0-9\\-]*\\.crt)')
    file_name = file_pattern.search(output).groups()[0]
    self.assertTrue(openssl_verify('cluster.crt', file_name, cwd=self.temp_path.path))
