mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-23 23:23:05 +08:00
CICD: Warn user if -provider does not match profiles.json:TYPE (#3375)
This commit is contained in:
parent
0d5b3c22b7
commit
fc2c506920
1 changed files with 6 additions and 2 deletions
|
@ -99,15 +99,19 @@ func getProvider(t *testing.T) (providers.DNSServiceProvider, string, map[string
|
||||||
if *profileFlag == "" {
|
if *profileFlag == "" {
|
||||||
*profileFlag = profileName
|
*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 {
|
if *providerFlag != profileType {
|
||||||
fmt.Printf("WARNING: -provider=%q does not match profile TYPE=%q. Using profile TYPE.\n", *providerFlag, profileType)
|
fmt.Printf("WARNING: -provider=%q does not match profile TYPE=%q. Using profile TYPE.\n", *providerFlag, profileType)
|
||||||
*providerFlag = profileType
|
*providerFlag = profileType
|
||||||
}
|
}
|
||||||
|
|
||||||
// fmt.Printf("DEBUG flag=%q Profile=%q TYPE=%q\n", *providerFlag, profileName, 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
|
var metadata json.RawMessage
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue