MCPcopy Create free account
hub / github.com/docker/docker-language-server / testPaths

Function testPaths

internal/bake/hcl/definition_test.go:18–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16)
17
18func testPaths(t *testing.T) (dockerfilePath, backendDockerfilePath, bakeFilePath string) {
19 wd, err := os.Getwd()
20 require.NoError(t, err)
21 projectRoot := filepath.Dir(filepath.Dir(filepath.Dir(wd)))
22 definitionTestFolderPath := filepath.Join(projectRoot, "testdata", "definition")
23
24 dockerfilePath = filepath.Join(definitionTestFolderPath, "Dockerfile")
25 backendDockerfilePath = filepath.Join(definitionTestFolderPath, "backend", "Dockerfile")
26 bakeFilePath = filepath.Join(definitionTestFolderPath, "docker-bake.hcl")
27 return dockerfilePath, backendDockerfilePath, bakeFilePath
28}
29
30func TestDefinition(t *testing.T) {
31 dockerfilePath, backendDockerfilePath, bakeFilePath := testPaths(t)

Callers 2

TestDefinitionFunction · 0.85
TestDefinition_WSLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected