MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestSkillUninstallRemovesDir

Function TestSkillUninstallRemovesDir

internal/app/skill_test.go:136–151  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

134
135 // Pre-create something different.
136 if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
137 t.Fatal(err)
138 }
139 if err := os.WriteFile(path, []byte("something else"), 0o644); err != nil {
140 t.Fatal(err)
141 }
142
143 if rc := cmdSkill([]string{"install", "--force"}); rc != 0 {
144 t.Fatalf("install --force rc=%d", rc)
145 }
146 data, err := os.ReadFile(path)
147 if err != nil {
148 t.Fatal(err)
149 }
150 if string(data) == "something else" {
151 t.Error("install --force did not overwrite existing file")
152 }
153}
154

Callers

nothing calls this directly

Calls 2

withTempHomeFunction · 0.85
cmdSkillFunction · 0.85

Tested by

no test coverage detected