Skip to content

Commit 2dcf1f8

Browse files
committed
Add comment
1 parent 8c603f6 commit 2dcf1f8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

enterprise/coderd/coderd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
135135
}
136136
auditLogs := codersdk.EntitlementNotEntitled
137137

138+
// Here we loop through licenses to detect enabled features.
138139
for _, l := range licenses {
139140
claims, err := validateDBLicense(l, api.Keys)
140141
if err != nil {

enterprise/coderd/licenses_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
func TestPostLicense(t *testing.T) {
2121
t.Parallel()
2222

23-
t.Run("POST", func(t *testing.T) {
23+
t.Run("Success", func(t *testing.T) {
2424
t.Parallel()
2525
client := coderdenttest.New(t, nil)
2626
_ = coderdtest.CreateFirstUser(t, client)
@@ -37,7 +37,7 @@ func TestPostLicense(t *testing.T) {
3737
assert.Equal(t, json.Number("1"), features[codersdk.FeatureAuditLog])
3838
})
3939

40-
t.Run("POST_unauthorized", func(t *testing.T) {
40+
t.Run("Unauthorized", func(t *testing.T) {
4141
t.Parallel()
4242
client := coderdenttest.New(t, nil)
4343
_, err := client.AddLicense(context.Background(), codersdk.AddLicenseRequest{
@@ -51,7 +51,7 @@ func TestPostLicense(t *testing.T) {
5151
}
5252
})
5353

54-
t.Run("POST_corrupted", func(t *testing.T) {
54+
t.Run("Corrupted", func(t *testing.T) {
5555
t.Parallel()
5656
client := coderdenttest.New(t, nil)
5757
_ = coderdtest.CreateFirstUser(t, client)
@@ -70,7 +70,7 @@ func TestPostLicense(t *testing.T) {
7070

7171
func TestGetLicense(t *testing.T) {
7272
t.Parallel()
73-
t.Run("GET", func(t *testing.T) {
73+
t.Run("Success", func(t *testing.T) {
7474
t.Parallel()
7575
client := coderdenttest.New(t, nil)
7676
_ = coderdtest.CreateFirstUser(t, client)
@@ -108,7 +108,7 @@ func TestGetLicense(t *testing.T) {
108108

109109
func TestDeleteLicense(t *testing.T) {
110110
t.Parallel()
111-
t.Run("DELETE_empty", func(t *testing.T) {
111+
t.Run("Empty", func(t *testing.T) {
112112
t.Parallel()
113113
client := coderdenttest.New(t, nil)
114114
_ = coderdtest.CreateFirstUser(t, client)
@@ -124,7 +124,7 @@ func TestDeleteLicense(t *testing.T) {
124124
}
125125
})
126126

127-
t.Run("DELETE_bad_id", func(t *testing.T) {
127+
t.Run("BadID", func(t *testing.T) {
128128
t.Parallel()
129129
client := coderdenttest.New(t, nil)
130130
_ = coderdtest.CreateFirstUser(t, client)
@@ -137,7 +137,7 @@ func TestDeleteLicense(t *testing.T) {
137137
require.NoError(t, resp.Body.Close())
138138
})
139139

140-
t.Run("DELETE", func(t *testing.T) {
140+
t.Run("Success", func(t *testing.T) {
141141
t.Parallel()
142142
client := coderdenttest.New(t, nil)
143143
_ = coderdtest.CreateFirstUser(t, client)

0 commit comments

Comments
 (0)