def test_register_from_pack_fail_on_failure_pack_dir_doesnt_exist(self):
        # No fail on failure flag, should succeed
        pack_dir = 'doesntexistblah'
        cmd = BASE_REGISTER_ACTIONS_CMD_ARGS + ['--register-pack=%s' % (pack_dir)]
        exit_code, _, _ = run_command(cmd=cmd)
        self.assertEqual(exit_code, 0)

        # Fail on failure, should fail
        cmd = BASE_REGISTER_ACTIONS_CMD_ARGS + ['--register-pack=%s' % (pack_dir),
                                                '--register-fail-on-failure']
        exit_code, _, stderr = run_command(cmd=cmd)
        self.assertTrue('Directory "doesntexistblah" doesn\'t exist' in stderr)
        self.assertEqual(exit_code, 1)
dataset/ETHPy150Open StackStorm/st2/st2common/tests/integration/test_register_content_script.py/ContentRegisterScripTestCase.test_register_from_pack_fail_on_failure_pack_dir_doesnt_exist/original