go test passes -short as -test.short=true, so scanning os.Args for -test.short never matched and every -short run started a container (and failed without Docker). Read the flag through flag.Parse and testing.Short instead.