From ac279b348399b02dc35ddc4431d43c2374b07e6c Mon Sep 17 00:00:00 2001 From: Spike Curtis Date: Wed, 7 Sep 2022 10:27:42 -0700 Subject: [PATCH] Add periods to end of license warning text. (#3933) * Add periods to end of license warning text. Signed-off-by: Spike Curtis * Fix tests Signed-off-by: Spike Curtis Signed-off-by: Spike Curtis --- enterprise/coderd/features.go | 4 ++-- enterprise/coderd/features_internal_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/enterprise/coderd/features.go b/enterprise/coderd/features.go index 511e3eb05c..a851812594 100644 --- a/enterprise/coderd/features.go +++ b/enterprise/coderd/features.go @@ -112,7 +112,7 @@ func (s *featuresService) EntitlementsAPI(rw http.ResponseWriter, r *http.Reques if n > e.activeUsers.limit { resp.Warnings = append(resp.Warnings, fmt.Sprintf( - "Your deployment has %d active users but is only licensed for %d", + "Your deployment has %d active users but is only licensed for %d.", n, e.activeUsers.limit)) } } @@ -125,7 +125,7 @@ func (s *featuresService) EntitlementsAPI(rw http.ResponseWriter, r *http.Reques } if e.auditLogs.state == gracePeriod && s.enablements.AuditLogs { resp.Warnings = append(resp.Warnings, - "Audit logging is enabled but your license for this feature is expired") + "Audit logging is enabled but your license for this feature is expired.") } httpapi.Write(rw, http.StatusOK, resp) diff --git a/enterprise/coderd/features_internal_test.go b/enterprise/coderd/features_internal_test.go index da5bb39176..629e427d27 100644 --- a/enterprise/coderd/features_internal_test.go +++ b/enterprise/coderd/features_internal_test.go @@ -165,9 +165,9 @@ func TestFeaturesService_EntitlementsAPI(t *testing.T) { assert.Nil(t, al.Actual) assert.Len(t, result.Warnings, 2) assert.Contains(t, result.Warnings, - "Your deployment has 5 active users but is only licensed for 4") + "Your deployment has 5 active users but is only licensed for 4.") assert.Contains(t, result.Warnings, - "Audit logging is enabled but your license for this feature is expired") + "Audit logging is enabled but your license for this feature is expired.") }) }