def test_validate_server_certs_key_passphrase(self):
    conf = self.useFixture(oslo_fixture.Config(config.cfg.CONF))
    conf.config(group='certificates', server_certs_key_passphrase='insecure-key-do-not-use-this-key')
    self.assertRaises(ValueError, conf.config, group='certificates', server_certs_key_passphrase='short_passphrase')
    self.assertRaises(ValueError, conf.config, group='certificates', server_certs_key_passphrase='long-insecure-key-do-not-use-this')
    self.assertRaises(ValueError, conf.config, group='certificates', server_certs_key_passphrase='insecure-key-do-not-u$e-this-key')
def test_validate_server_certs_key_passphrase(self):
    conf = self.useFixture(oslo_fixture.Config(config.cfg.CONF))
    conf.config(group='certificates', server_certs_key_passphrase='insecure-key-do-not-use-this-key')
    self.assertRaises(ValueError, conf.config, group='certificates', server_certs_key_passphrase='short_passphrase')
    self.assertRaises(ValueError, conf.config, group='certificates', server_certs_key_passphrase='long-insecure-key-do-not-use-this')
    self.assertRaises(ValueError, conf.config, group='certificates', server_certs_key_passphrase='insecure-key-do-not-u$e-this-key')