def test_minion_retry_dns_count():
    """
    Tests that the resolve_dns will retry dns look ups for a maximum of
    3 times before raising a SaltMasterUnresolvableError exception.
    """
    opts = salt.config.DEFAULT_MINION_OPTS.copy()
    with patch.dict(
        opts,
        {
            "ipv6": False,
            "master": "dummy",
            "master_port": "4555",
            "retry_dns": 1,
            "retry_dns_count": 3,
        },
    ):
        pytest.raises(SaltMasterUnresolvableError, salt.minion.resolve_dns, opts)