MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestReadFileContent_SizeLimit

Function TestReadFileContent_SizeLimit

internal/cli/quickstart_detect_test.go:1185–1197  ·  view source on GitHub ↗

-- readFileContent --.

(t *testing.T)

Source from the content-addressed store, hash-verified

1183// -- readFileContent --.
1184
1185func TestReadFileContent_SizeLimit(t *testing.T) {
1186 t.Parallel()
1187
1188 dir := t.TempDir()
1189 // Write a file slightly over maxDetectionFileSize (10 MB).
1190 oversizedFile := filepath.Join(dir, "big.xml")
1191 data := make([]byte, maxDetectionFileSize+1)
1192 require.NoError(t, os.WriteFile(oversizedFile, data, 0600))
1193
1194 content, ok := readFileContent(dir, "big.xml")
1195 assert.False(t, ok, "readFileContent should reject files over maxDetectionFileSize")
1196 assert.Empty(t, content)
1197}
1198
1199// -- defaultPortForFramework --.
1200

Callers

nothing calls this directly

Calls 1

readFileContentFunction · 0.85

Tested by

no test coverage detected