(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func 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 | |
| 32 | func TestParseModuleConfig(t *testing.T) { |
| 33 | testModuleSource := "../../tests/test_data/modules/ci" |
nothing calls this directly
no test coverage detected