mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
Add periods to end of license warning text. (#3933)
* Add periods to end of license warning text. Signed-off-by: Spike Curtis <spike@coder.com> * Fix tests Signed-off-by: Spike Curtis <spike@coder.com> Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@ -112,7 +112,7 @@ func (s *featuresService) EntitlementsAPI(rw http.ResponseWriter, r *http.Reques
|
|||||||
if n > e.activeUsers.limit {
|
if n > e.activeUsers.limit {
|
||||||
resp.Warnings = append(resp.Warnings,
|
resp.Warnings = append(resp.Warnings,
|
||||||
fmt.Sprintf(
|
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))
|
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 {
|
if e.auditLogs.state == gracePeriod && s.enablements.AuditLogs {
|
||||||
resp.Warnings = append(resp.Warnings,
|
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)
|
httpapi.Write(rw, http.StatusOK, resp)
|
||||||
|
@ -165,9 +165,9 @@ func TestFeaturesService_EntitlementsAPI(t *testing.T) {
|
|||||||
assert.Nil(t, al.Actual)
|
assert.Nil(t, al.Actual)
|
||||||
assert.Len(t, result.Warnings, 2)
|
assert.Len(t, result.Warnings, 2)
|
||||||
assert.Contains(t, result.Warnings,
|
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,
|
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.")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user