expected:"bluecat: some credentials information are missing: BLUECAT_SERVER_URL,BLUECAT_USER_NAME,BLUECAT_PASSWORD,BLUECAT_CONFIG_NAME,BLUECAT_DNS_VIEW",
},
{
desc:"missing server url",
envVars:map[string]string{
"BLUECAT_SERVER_URL":"",
"BLUECAT_USER_NAME":"A",
"BLUECAT_PASSWORD":"B",
"BLUECAT_CONFIG_NAME":"C",
"BLUECAT_DNS_VIEW":"D",
},
expected:"bluecat: some credentials information are missing: BLUECAT_SERVER_URL",
},
{
desc:"missing username",
envVars:map[string]string{
"BLUECAT_SERVER_URL":"http://localhost",
"BLUECAT_USER_NAME":"",
"BLUECAT_PASSWORD":"B",
"BLUECAT_CONFIG_NAME":"C",
"BLUECAT_DNS_VIEW":"D",
},
expected:"bluecat: some credentials information are missing: BLUECAT_USER_NAME",
},
{
desc:"missing password",
envVars:map[string]string{
"BLUECAT_SERVER_URL":"http://localhost",
"BLUECAT_USER_NAME":"A",
"BLUECAT_PASSWORD":"",
"BLUECAT_CONFIG_NAME":"C",
"BLUECAT_DNS_VIEW":"D",
},
expected:"bluecat: some credentials information are missing: BLUECAT_PASSWORD",
},
{
desc:"missing config name",
envVars:map[string]string{
"BLUECAT_SERVER_URL":"http://localhost",
"BLUECAT_USER_NAME":"A",
"BLUECAT_PASSWORD":"B",
"BLUECAT_CONFIG_NAME":"",
"BLUECAT_DNS_VIEW":"D",
},
expected:"bluecat: some credentials information are missing: BLUECAT_CONFIG_NAME",
},
{
desc:"missing DNS view",
envVars:map[string]string{
"BLUECAT_SERVER_URL":"http://localhost",
"BLUECAT_USER_NAME":"A",
"BLUECAT_PASSWORD":"B",
"BLUECAT_CONFIG_NAME":"C",
"BLUECAT_DNS_VIEW":"",
},
expected:"bluecat: some credentials information are missing: BLUECAT_DNS_VIEW",