From 27f1c9bd84f0dfbb62de2e56052dae89793a2793 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 30 Apr 2021 07:33:30 -0400 Subject: [PATCH] openshift-tests: fix a --provider --dry-run edge case Trying to override --provider while not actually connected to a cluster (eg, to look at the output of --dry-run) would fail, rather than just falling back to not trying to autodetect anything. --- cmd/openshift-tests/provider.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/openshift-tests/provider.go b/cmd/openshift-tests/provider.go index 84cd6fe5dcc2..c1fc6d5d5eb4 100644 --- a/cmd/openshift-tests/provider.go +++ b/cmd/openshift-tests/provider.go @@ -120,7 +120,8 @@ func decodeProvider(provider string, dryRun, discover bool, clusterState *exutil if clusterState != nil { config, _ = exutilcluster.LoadConfig(clusterState) } - } else { + } + if config == nil { config = &exutilcluster.ClusterConfiguration{} }