def METHOD_NAME():
    cmd_run_mock = MagicMock(return_value={})
    postgres_opts = {
        "config.option": configmod.option,
        "cmd.run_all": cmd_run_mock,
    }
    kwargs = {
        "clean_env": True,
        "runas": "saltuser",
        "python_shell": False,
    }
    cmd_str = "/fake/path --pgdata=fakename --username=saltuser --auth=password --encoding=UTF8"
    with patch.dict(postgres.__salt__, postgres_opts):
        with patch.object(postgres, "_find_pg_binary", return_value="/fake/path"):
            with patch.dict(
                configmod.__opts__, {"postgres.timeout": 60, "postgres.pass": None}
            ):
                postgres._run_initdb("fakename", runas="saltuser")
                cmd_run_mock.assert_called_with(cmd_str, timeout=60, **kwargs)
            with patch.dict(configmod.__opts__, {"postgres.pass": None}):
                postgres._run_initdb("fakename", runas="saltuser")
                cmd_run_mock.assert_called_with(cmd_str, timeout=0, **kwargs)