mod/modconfig: set DOCKER_CONFIG in tests to prevent hangs
Tests that call NewRegistry without setting
DOCKER_CONFIG fall through to the system
~/.docker/config.json, which may have a
credsStore credential helper that hangs
when Docker Desktop is not running.
Write an empty config.json to a temp dir
and point DOCKER_CONFIG at it so that
ociauth skips the credential helper.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ica338f39e09eada33db16a110ad83cffacf5e8d5
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235298
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>