MCPcopy Index your code
hub / github.com/coder/coder / TestAuditDBEnumsCovered

Function TestAuditDBEnumsCovered

coderd/database/gentest/models_test.go:16–24  ·  view source on GitHub ↗

TestAuditDBEnumsCovered ensures that all enums in the database are covered by the codersdk enums for audit log strings.

(t *testing.T)

Source from the content-addressed store, hash-verified

14// TestAuditDBEnumsCovered ensures that all enums in the database are covered by the codersdk enums
15// for audit log strings.
16func TestAuditDBEnumsCovered(t *testing.T) {
17 t.Parallel()
18
19 dbTypes := database.AllResourceTypeValues()
20 for _, ty := range dbTypes {
21 str := codersdk.ResourceType(ty).FriendlyString()
22 require.NotEqualf(t, "unknown", str, "ResourceType %q not covered by codersdk.ResourceType", ty)
23 }
24}
25
26// TestViewSubsetTemplate ensures TemplateTable is a subset of Template
27func TestViewSubsetTemplate(t *testing.T) {

Callers

nothing calls this directly

Calls 3

AllResourceTypeValuesFunction · 0.92
ResourceTypeTypeAlias · 0.92
FriendlyStringMethod · 0.80

Tested by

no test coverage detected