

def test_keys_generation(self):
    tempdir = tempfile.mkdtemp(dir=integration.SYS_TMP_DIR)
    arg_str = '--gen-keys minibar --gen-keys-dir {0}'.format(tempdir)
    self.run_key(arg_str)
    try:
        key_names = None
        if (self.master_opts['transport'] in ('zeromq', 'tcp')):
            key_names = ('minibar.pub', 'minibar.pem')
        elif (self.master_opts['transport'] == 'raet'):
            key_names = ('minibar.key',)
        for fname in key_names:
            self.assertTrue(os.path.isfile(os.path.join(tempdir, fname)))
    finally:
        shutil.rmtree(tempdir)

dataset/ETHPy150Open saltstack/salt/tests/integration/shell/key.py KeyTest.test_keys_generation/original