From fc2c5069202fb8d2e1eb70aba5dde103afc16022 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Wed, 15 Jan 2025 18:28:15 -0500 Subject: [PATCH] CICD: Warn user if -provider does not match profiles.json:TYPE (#3375) --- integrationTest/integration_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integrationTest/integration_test.go b/integrationTest/integration_test.go index d00247b6f..717ac4439 100644 --- a/integrationTest/integration_test.go +++ b/integrationTest/integration_test.go @@ -99,15 +99,19 @@ func getProvider(t *testing.T) (providers.DNSServiceProvider, string, map[string if *profileFlag == "" { *profileFlag = profileName } + // Fill in -provider if blank. + if *providerFlag == "" { + *providerFlag = profileType + } - // Fix legacy use of -provider. + // Sanity check. If the user-specifed -provider flag doesn't match what was in the file, warn them. if *providerFlag != profileType { fmt.Printf("WARNING: -provider=%q does not match profile TYPE=%q. Using profile TYPE.\n", *providerFlag, profileType) *providerFlag = profileType } // fmt.Printf("DEBUG flag=%q Profile=%q TYPE=%q\n", *providerFlag, profileName, profileType) - fmt.Printf("Testing Profile=%q TYPE=%q\n", profileName, profileType) + fmt.Printf("Testing Profile=%q (TYPE=%q)\n", profileName, profileType) var metadata json.RawMessage