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

Function TestGetSourceDir

internal/module/module_test.go:15–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestGetSourceDir(t *testing.T) {
16 source := "tests/test_data/modules"
17 relativeSource := source
18 dir := module.GetSourceDir(source)
19
20 t.Log("dir", dir)
21 if dir != relativeSource {
22 t.Errorf("Error, local sources should not be changed: %s", source)
23 }
24
25 source = "github.com/commitdev/my-repo"
26 dir = module.GetSourceDir(source)
27 if dir == relativeSource {
28 t.Errorf("Error, remote sources should be converted to a local dir: %s", source)
29 }
30}
31
32func TestParseModuleConfig(t *testing.T) {
33 testModuleSource := "../../tests/test_data/modules/ci"

Callers

nothing calls this directly

Calls 1

GetSourceDirFunction · 0.92

Tested by

no test coverage detected