MCPcopy Index your code
hub / github.com/commitdev/zero / TestGetModulesByName

Function TestGetModulesByName

internal/registry/registry_test.go:26–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24}
25
26func TestGetModulesByName(t *testing.T) {
27 reg := testRegistry()
28 t.Run("should return modules of specified stack", func(t *testing.T) {
29
30 assert.Equal(t, registry.GetModulesByName(reg, "EKS + Go + React + Gatsby"),
31 []string{"module-source 1", "module-source 2"})
32 assert.Equal(t, registry.GetModulesByName(reg, "lorem"), []string{"module-source 5"})
33 assert.Equal(t, registry.GetModulesByName(reg, "ipsum"), []string{"module-source 6"})
34 assert.Equal(t, registry.GetModulesByName(reg, "Custom"), []string{"module-source 7"})
35 })
36}
37
38func testRegistry() registry.Registry {
39 return registry.Registry{

Callers

nothing calls this directly

Calls 2

GetModulesByNameFunction · 0.92
testRegistryFunction · 0.85

Tested by

no test coverage detected