diff --git a/command/operator_diagnose_test.go b/command/operator_diagnose_test.go index 1acd2079e..b49de01b7 100644 --- a/command/operator_diagnose_test.go +++ b/command/operator_diagnose_test.go @@ -71,7 +71,7 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) { }, { Name: "test-storage-tls-consul", - Status: diagnose.OkStatus, + Status: diagnose.SkippedStatus, }, { Name: "test-consul-direct-access-storage", @@ -85,7 +85,7 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) { Children: []*diagnose.Result{ { Name: "test-serviceregistration-tls-consul", - Status: diagnose.OkStatus, + Status: diagnose.SkippedStatus, }, { Name: "test-consul-direct-access-service-discovery", @@ -121,7 +121,7 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) { }, { Name: "test-ha-storage-tls-consul", - Status: diagnose.OkStatus, + Status: diagnose.SkippedStatus, }, }, }, @@ -278,7 +278,7 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) { }, { Name: "test-storage-tls-consul", - Status: diagnose.OkStatus, + Status: diagnose.SkippedStatus, }, { Name: "test-consul-direct-access-storage", @@ -378,7 +378,7 @@ func TestOperatorDiagnoseCommand_Run(t *testing.T) { }, { Name: "test-storage-tls-consul", - Status: diagnose.OkStatus, + Status: diagnose.SkippedStatus, }, { Name: "test-consul-direct-access-storage", diff --git a/physical/consul/consul.go b/physical/consul/consul.go index 8bcb92ddc..0f966c30b 100644 --- a/physical/consul/consul.go +++ b/physical/consul/consul.go @@ -212,6 +212,10 @@ func SetupSecureTLS(ctx context.Context, consulConf *api.Config, conf map[string return err } logger.Debug("configured TLS") + } else { + if isDiagnose { + diagnose.Skipped(ctx, "HTTPS is not used, Skipping TLS verification.") + } } return nil } diff --git a/serviceregistration/consul/consul_service_registration.go b/serviceregistration/consul/consul_service_registration.go index cf126bebf..cd71515db 100644 --- a/serviceregistration/consul/consul_service_registration.go +++ b/serviceregistration/consul/consul_service_registration.go @@ -240,6 +240,10 @@ func SetupSecureTLS(ctx context.Context, consulConf *api.Config, conf map[string return err } logger.Debug("configured TLS") + } else { + if isDiagnose { + diagnose.Skipped(ctx, "HTTPS is not used, Skipping TLS verification.") + } } return nil }