summaryrefslogtreecommitdiff
path: root/internal/configuration/validator/duo_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/configuration/validator/duo_test.go')
-rw-r--r--internal/configuration/validator/duo_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/configuration/validator/duo_test.go b/internal/configuration/validator/duo_test.go
index ef4856b56..21cdbf6b1 100644
--- a/internal/configuration/validator/duo_test.go
+++ b/internal/configuration/validator/duo_test.go
@@ -23,6 +23,11 @@ func TestValidateDuo(t *testing.T) {
expected: schema.DuoAPIConfiguration{Disable: true},
},
{
+ desc: "ShouldDisableDuoConfigured",
+ have: &schema.Configuration{DuoAPI: schema.DuoAPIConfiguration{Disable: true, Hostname: "example.com"}},
+ expected: schema.DuoAPIConfiguration{Disable: true, Hostname: "example.com"},
+ },
+ {
desc: "ShouldNotDisableDuo",
have: &schema.Configuration{DuoAPI: schema.DuoAPIConfiguration{
Hostname: "test",
@@ -46,7 +51,7 @@ func TestValidateDuo(t *testing.T) {
IntegrationKey: "test",
},
errs: []string{
- "duo_api: option 'secret_key' is required when duo is enabled but it is missing",
+ "duo_api: option 'secret_key' is required when duo is enabled but it's absent",
},
},
{
@@ -60,7 +65,7 @@ func TestValidateDuo(t *testing.T) {
SecretKey: "test",
},
errs: []string{
- "duo_api: option 'integration_key' is required when duo is enabled but it is missing",
+ "duo_api: option 'integration_key' is required when duo is enabled but it's absent",
},
},
{
@@ -74,7 +79,7 @@ func TestValidateDuo(t *testing.T) {
SecretKey: "test",
},
errs: []string{
- "duo_api: option 'hostname' is required when duo is enabled but it is missing",
+ "duo_api: option 'hostname' is required when duo is enabled but it's absent",
},
},
}