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

def test_apiuser_certificate(self):

    flocker_ca('create-api-certificate', 'alice', cwd=self.temp_path.path)
    self.assertTrue(openssl_verify('cluster.crt', 'alice.crt', cwd=self.temp_path.path))
