Skip to content

Commit eeb0f48

Browse files
committed
make gen
1 parent d7a0abf commit eeb0f48

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

cli/testdata/coder_templates_list_--help.golden

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ OPTIONS:
1111
-O, --org string, $CODER_ORGANIZATION
1212
Select which organization (uuid or name) to use.
1313

14-
-c, --column string-array (default: name,last updated,used by)
14+
-c, --column string-array (default: name,organization name,last updated,used by)
1515
Columns to display in table output. Available columns: name, created
16-
at, last updated, organization id, provisioner, active version id,
17-
used by, default ttl.
16+
at, last updated, organization id, organization name, provisioner,
17+
active version id, used by, default ttl.
1818

1919
-o, --output string (default: table)
2020
Output format. Available formats: table, json.

coderd/templates_test.go

+10
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,13 @@ func TestTemplatesByOrganization(t *testing.T) {
443443
templates, err = client.Templates(ctx)
444444
require.NoError(t, err)
445445
require.Len(t, templates, 2)
446+
447+
org, err := client.Organization(ctx, user.OrganizationID)
448+
require.NoError(t, err)
449+
for _, tmpl := range templates {
450+
require.Equal(t, tmpl.OrganizationID, user.OrganizationID, "organization ID")
451+
require.Equal(t, tmpl.OrganizationName, org.Name, "organization name")
452+
}
446453
})
447454
t.Run("MultipleOrganizations", func(t *testing.T) {
448455
t.Parallel()
@@ -474,6 +481,9 @@ func TestTemplatesByOrganization(t *testing.T) {
474481
templates, err = user.Templates(ctx)
475482
require.NoError(t, err)
476483
require.Len(t, templates, 2)
484+
for _, tmpl := range templates {
485+
require.Equal(t, tmpl.OrganizationName, org2.Name, "organization name on template")
486+
}
477487
})
478488
}
479489

docs/cli/templates_list.md

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)