MCPcopy Create free account
hub / github.com/docker/cli / tmpFileWithContent

Function tmpFileWithContent

cli/compose/loader/envfile_test.go:12–18  ·  view source on GitHub ↗
(t *testing.T, content string)

Source from the content-addressed store, hash-verified

10)
11
12func tmpFileWithContent(t *testing.T, content string) string {
13 t.Helper()
14 fileName := filepath.Join(t.TempDir(), "envfile")
15 err := os.WriteFile(fileName, []byte(content), 0o644)
16 assert.NilError(t, err)
17 return fileName
18}
19
20// Test parseEnvFile for a non existent file
21func TestParseEnvFileNonExistentFile(t *testing.T) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…