MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / createTestPattern

Function createTestPattern

internal/plugins/db/fsdb/patterns_test.go:35–42  ·  view source on GitHub ↗

Helper to create a test pattern file

(t *testing.T, entity *PatternsEntity, name, content string)

Source from the content-addressed store, hash-verified

33
34// Helper to create a test pattern file
35func createTestPattern(t *testing.T, entity *PatternsEntity, name, content string) {
36 patternDir := filepath.Join(entity.Dir, name)
37 err := os.MkdirAll(patternDir, 0755)
38 require.NoError(t, err)
39
40 err = os.WriteFile(filepath.Join(patternDir, entity.SystemPatternFile), []byte(content), 0644)
41 require.NoError(t, err)
42}
43
44func TestApplyVariables(t *testing.T) {
45 entity := &PatternsEntity{}

Callers 5

TestGetApplyVariablesFunction · 0.85
TestGetWithoutVariablesFunction · 0.85
TestPrintPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected