MCPcopy Create free account
hub / github.com/gotenberg/gotenberg / TestGetModuleDescriptors

Function TestGetModuleDescriptors

pkg/gotenberg/modules_test.go:81–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestGetModuleDescriptors(t *testing.T) {
82 descriptorsMu.RLock()
83 descriptors = map[string]ModuleDescriptor{
84 "d": {ID: "d"},
85 "c": {ID: "c"},
86 "b": {ID: "b"},
87 "a": {ID: "a"},
88 }
89 descriptorsMu.RUnlock()
90
91 expect := []ModuleDescriptor{
92 {ID: "a"},
93 {ID: "b"},
94 {ID: "c"},
95 {ID: "d"},
96 }
97
98 actual := GetModuleDescriptors()
99
100 if !reflect.DeepEqual(actual, expect) {
101 t.Errorf("expected %v but got %v", expect, actual)
102 }
103
104 descriptorsMu.RLock()
105 descriptors = make(map[string]ModuleDescriptor)
106 descriptorsMu.RUnlock()
107}

Callers

nothing calls this directly

Calls 1

GetModuleDescriptorsFunction · 0.85

Tested by

no test coverage detected