Skip to content

Commit a2c0f7e

Browse files
committed
fix: skip restart-odek-telegram E2E tests when skills dir missing
1 parent 6cfde4f commit a2c0f7e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

internal/skills/restart_e2e_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package skills
22

33
import (
4+
"os"
45
"strings"
56
"testing"
67
)
@@ -9,6 +10,9 @@ import (
910
// correctly triggers the restart-odek-telegram skill for common user
1011
// inputs like "rebuild and restart", "restart the bot", etc.
1112
func TestRestartSkill_Triggers_ScoredMatcher(t *testing.T) {
13+
if _, err := os.Stat("/root/.odek/skills"); os.IsNotExist(err) {
14+
t.Skip("skills directory not found — E2E test requires installed skills")
15+
}
1216
sm := NewSkillManager("", "/root/.odek/skills")
1317
sm.Reload()
1418

@@ -60,6 +64,9 @@ func TestRestartSkill_Triggers_ScoredMatcher(t *testing.T) {
6064
// actually directs the agent to use the build-and-restart script,
6165
// not manual build or kill commands.
6266
func TestRestartSkill_BodyContainsScript(t *testing.T) {
67+
if _, err := os.Stat("/root/.odek/skills"); os.IsNotExist(err) {
68+
t.Skip("skills directory not found — E2E test requires installed skills")
69+
}
6370
sm := NewSkillManager("", "/root/.odek/skills")
6471
sm.Reload()
6572

0 commit comments

Comments
 (0)