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

Function TestMaybeAutoUpgradeSkipsForDev

internal/app/version_test.go:95–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestMaybeAutoUpgradeSkipsForDev(t *testing.T) {
96 home := withTempHome(t)
97 withVersion(t, "v1.0.0")
98 if rc := cmdSkill([]string{"install"}); rc != 0 {
99 t.Fatalf("install rc=%d", rc)
100 }
101 skillPath := filepath.Join(home, ".claude", "skills", "flow", "SKILL.md")
102 if err := os.WriteFile(skillPath, []byte("dev edits"), 0o644); err != nil {
103 t.Fatal(err)
104 }
105
106 // Dev build → must not touch user-edited skill.
107 Version = "dev"
108 maybeAutoUpgradeSkill()
109
110 got, _ := os.ReadFile(skillPath)
111 if string(got) != "dev edits" {
112 t.Error("dev build clobbered locally-edited SKILL.md")
113 }
114}
115
116func TestMaybeAutoUpgradeSkipsWhenSkillMissing(t *testing.T) {
117 withTempHome(t)

Callers

nothing calls this directly

Calls 5

withTempHomeFunction · 0.85
withVersionFunction · 0.85
cmdSkillFunction · 0.85
maybeAutoUpgradeSkillFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected