appease linter

This commit is contained in:
booleanmaybe 2026-04-14 23:04:07 -04:00
parent 70d572b7a4
commit ae3634da1b
24 changed files with 90 additions and 0 deletions

View file

@ -25,6 +25,7 @@ func TestLookupAITool_Found(t *testing.T) {
tool, ok := LookupAITool("claude")
if !ok {
t.Fatal("expected to find claude")
return
}
if tool.Command != "claude" {
t.Errorf("expected command 'claude', got %q", tool.Command)

View file

@ -120,6 +120,7 @@ func TestRegistry_Lookup(t *testing.T) {
def, ok := reg.Lookup("ready")
if !ok {
t.Fatal("expected to find 'ready'")
return
}
if def.Label != "Ready" {
t.Errorf("expected label 'Ready', got %q", def.Label)

View file

@ -922,6 +922,7 @@ func TestNewTask_WithStatusAndType_Saves(t *testing.T) {
task := findTaskByTitle(ta.TaskStore.GetAllTasks(), "Hey")
if task == nil {
t.Fatalf("new task not found in store")
return
}
t.Logf("Task found: Title=%q, Status=%v, Type=%v", task.Title, task.Status, task.Type)

View file

@ -387,6 +387,7 @@ func TestRunQueryCreatePersists(t *testing.T) {
}
if found == nil {
t.Fatal("created task not found in store")
return
}
if !strings.HasPrefix(found.ID, "TIKI-") || len(found.ID) != 11 {
t.Errorf("ID = %q, want TIKI-XXXXXX format (11 chars)", found.ID)
@ -432,6 +433,7 @@ func TestRunQueryCreateTemplateDefaults(t *testing.T) {
}
if found == nil {
t.Fatal("created task not found in store")
return
}
// InMemoryStore template has tags=["idea"], so result should be ["idea", "extra"]
if len(found.Tags) != 2 || found.Tags[0] != "idea" || found.Tags[1] != "extra" {

View file

@ -43,6 +43,7 @@ func TestSchemaFieldMapping(t *testing.T) {
spec, ok := s.Field(tt.name)
if !ok {
t.Fatalf("Field(%q) not found", tt.name)
return
}
if spec.Type != tt.wantType {
t.Errorf("Field(%q).Type = %d, want %d", tt.name, spec.Type, tt.wantType)

View file

@ -17,6 +17,7 @@ func TestParseViewerInputGitHubBlobURL(t *testing.T) {
}
if !ok {
t.Fatal("expected viewer mode")
return
}
if spec.Kind != InputGitHub {
t.Fatalf("expected github input, got %s", spec.Kind)
@ -96,6 +97,7 @@ func TestParseViewerInputGitHubSingleSegmentFallsThrough(t *testing.T) {
}
if !ok {
t.Fatal("expected viewer mode (treated as file path)")
return
}
if spec.Kind != InputFile {
t.Fatalf("single-segment github path should fall through to file, got %s", spec.Kind)
@ -114,6 +116,7 @@ func TestParseViewerInputGitLabBasic(t *testing.T) {
}
if !ok {
t.Fatal("expected viewer mode")
return
}
if spec.Kind != InputGitLab {
t.Fatalf("expected gitlab input, got %s", spec.Kind)
@ -167,6 +170,7 @@ func TestParseViewerInputGitLabHTTPS(t *testing.T) {
}
if !ok {
t.Fatal("expected viewer mode")
return
}
if spec.Kind != InputGitLab {
t.Fatalf("expected gitlab input, got %s", spec.Kind)
@ -183,6 +187,7 @@ func TestParseViewerInputGitLabSingleSegmentFallsThrough(t *testing.T) {
}
if !ok {
t.Fatal("expected viewer mode (file path fallthrough)")
return
}
if spec.Kind != InputFile {
t.Fatalf("single-segment gitlab path should fall through to file, got %s", spec.Kind)

View file

@ -13,6 +13,7 @@ func TestParseViewerInputFile(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputFile {
t.Fatalf("expected file input, got %s", spec.Kind)
@ -36,6 +37,7 @@ func TestParseViewerInputStdin(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputStdin {
t.Fatalf("expected stdin input, got %s", spec.Kind)
@ -49,6 +51,7 @@ func TestParseViewerInputURL(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputURL {
t.Fatalf("expected url input, got %s", spec.Kind)
@ -65,6 +68,7 @@ func TestParseViewerInputGitHub(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputGitHub {
t.Fatalf("expected github input, got %s", spec.Kind)
@ -100,6 +104,7 @@ func TestParseViewerInputFlags(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputFile {
t.Fatalf("expected file input, got %s", spec.Kind)
@ -113,6 +118,7 @@ func TestParseViewerInputLogLevelMissingValue(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputFile {
t.Fatalf("expected file input, got %s", spec.Kind)
@ -165,6 +171,7 @@ func TestParseViewerInputImageFile(t *testing.T) {
}
if !ok {
t.Fatalf("expected viewer mode")
return
}
if spec.Kind != InputImage {
t.Fatalf("expected image input, got %s", spec.Kind)

View file

@ -13,6 +13,7 @@ func TestNewPluginConfig(t *testing.T) {
if pc == nil {
t.Fatal("NewPluginConfig() returned nil")
return
}
if pc.GetPluginName() != "testplugin" {

View file

@ -644,6 +644,7 @@ func TestLegacyWorkflowEndToEnd(t *testing.T) {
tp, ok := p.(*TikiPlugin)
if !ok {
t.Fatalf("expected TikiPlugin, got %T", p)
return
}
if tp.Name != "Board" {

View file

@ -31,6 +31,7 @@ func TestParsePluginConfig_FullyInline(t *testing.T) {
tp, ok := def.(*TikiPlugin)
if !ok {
t.Fatalf("Expected TikiPlugin, got %T", def)
return
}
if tp.Name != "Inline Test" {
@ -74,6 +75,7 @@ func TestParsePluginConfig_Minimal(t *testing.T) {
tp, ok := def.(*TikiPlugin)
if !ok {
t.Fatalf("Expected TikiPlugin, got %T", def)
return
}
if tp.Name != "Minimal" {

View file

@ -264,6 +264,7 @@ background: "#0000ff"
tikiPlugin, ok := plugin.(*TikiPlugin)
if !ok {
t.Fatalf("Expected TikiPlugin, got %T", plugin)
return
}
if tikiPlugin.GetName() != "Test Plugin" {
@ -745,6 +746,7 @@ foreground: "#00ff00"
dokiPlugin, ok := plugin.(*DokiPlugin)
if !ok {
t.Fatalf("Expected DokiPlugin, got %T", plugin)
return
}
if dokiPlugin.GetName() != "Doc Plugin" {

View file

@ -1478,6 +1478,7 @@ func TestDurationLiteralUnknownUnitError(t *testing.T) {
add, ok := cmp.Right.(*BinaryExpr)
if !ok {
t.Fatal("expected *BinaryExpr")
return
}
add.Right = &DurationLiteral{Value: 1, Unit: "bogus"}

View file

@ -333,6 +333,7 @@ func TestLower_BinaryExpr(t *testing.T) {
be, ok := a.Value.(*BinaryExpr)
if !ok {
t.Fatalf("expected BinaryExpr, got %T", a.Value)
return
}
if be.Op != "+" {
t.Errorf("expected '+', got %q", be.Op)
@ -640,6 +641,7 @@ func TestLower_DeleteStatement(t *testing.T) {
}
if stmt.Delete == nil {
t.Fatal("expected delete statement")
return
}
if stmt.Delete.Where == nil {
t.Fatal("expected non-nil where in delete")

View file

@ -86,6 +86,7 @@ func TestParseSelect(t *testing.T) {
}
if stmt.Select == nil {
t.Fatal("expected Select, got nil")
return
}
if tt.wantWhere && stmt.Select.Where == nil {
t.Fatal("expected Where condition, got nil")
@ -188,6 +189,7 @@ func TestParseDelete(t *testing.T) {
}
if stmt.Delete == nil {
t.Fatal("expected Delete, got nil")
return
}
if stmt.Delete.Where == nil {
t.Fatal("expected Where condition, got nil")
@ -212,6 +214,7 @@ func TestParseExpressions(t *testing.T) {
sl, ok := stmt.Create.Assignments[0].Value.(*StringLiteral)
if !ok {
t.Fatalf("expected StringLiteral, got %T", stmt.Create.Assignments[0].Value)
return
}
if sl.Value != "hello world" {
t.Fatalf("expected %q, got %q", "hello world", sl.Value)
@ -226,6 +229,7 @@ func TestParseExpressions(t *testing.T) {
il, ok := stmt.Create.Assignments[1].Value.(*IntLiteral)
if !ok {
t.Fatalf("expected IntLiteral, got %T", stmt.Create.Assignments[1].Value)
return
}
if il.Value != 2 {
t.Fatalf("expected 2, got %d", il.Value)
@ -279,6 +283,7 @@ func TestParseExpressions(t *testing.T) {
fc, ok := stmt.Create.Assignments[1].Value.(*FunctionCall)
if !ok {
t.Fatalf("expected FunctionCall, got %T", stmt.Create.Assignments[1].Value)
return
}
if fc.Name != "next_date" {
t.Fatalf("expected next_date, got %s", fc.Name)
@ -296,6 +301,7 @@ func TestParseExpressions(t *testing.T) {
be, ok := stmt.Create.Assignments[1].Value.(*BinaryExpr)
if !ok {
t.Fatalf("expected BinaryExpr, got %T", stmt.Create.Assignments[1].Value)
return
}
if be.Op != "+" {
t.Fatalf("expected +, got %s", be.Op)
@ -314,6 +320,7 @@ func TestParseExpressions(t *testing.T) {
dur, ok := be.Right.(*DurationLiteral)
if !ok {
t.Fatalf("expected DurationLiteral, got %T", be.Right)
return
}
if dur.Value != 2 || dur.Unit != "day" {
t.Fatalf("expected 2day, got %d%s", dur.Value, dur.Unit)
@ -349,6 +356,7 @@ func TestParseConditions(t *testing.T) {
cmp, ok := stmt.Select.Where.(*CompareExpr)
if !ok {
t.Fatalf("expected CompareExpr, got %T", stmt.Select.Where)
return
}
if cmp.Op != "=" {
t.Fatalf("expected =, got %s", cmp.Op)
@ -363,6 +371,7 @@ func TestParseConditions(t *testing.T) {
ie, ok := stmt.Select.Where.(*IsEmptyExpr)
if !ok {
t.Fatalf("expected IsEmptyExpr, got %T", stmt.Select.Where)
return
}
if ie.Negated {
t.Fatal("expected Negated=false")
@ -391,6 +400,7 @@ func TestParseConditions(t *testing.T) {
in, ok := stmt.Select.Where.(*InExpr)
if !ok {
t.Fatalf("expected InExpr, got %T", stmt.Select.Where)
return
}
if in.Negated {
t.Fatal("expected Negated=false")
@ -419,6 +429,7 @@ func TestParseConditions(t *testing.T) {
bc, ok := stmt.Select.Where.(*BinaryCondition)
if !ok {
t.Fatalf("expected BinaryCondition, got %T", stmt.Select.Where)
return
}
if bc.Op != "and" {
t.Fatalf("expected and, got %s", bc.Op)
@ -434,6 +445,7 @@ func TestParseConditions(t *testing.T) {
bc, ok := stmt.Select.Where.(*BinaryCondition)
if !ok {
t.Fatalf("expected BinaryCondition, got %T", stmt.Select.Where)
return
}
if bc.Op != "or" {
t.Fatalf("expected or at top, got %s", bc.Op)
@ -442,6 +454,7 @@ func TestParseConditions(t *testing.T) {
right, ok := bc.Right.(*BinaryCondition)
if !ok {
t.Fatalf("expected BinaryCondition on right, got %T", bc.Right)
return
}
if right.Op != "and" {
t.Fatalf("expected and on right, got %s", right.Op)
@ -470,6 +483,7 @@ func TestParseConditions(t *testing.T) {
bc, ok := stmt.Select.Where.(*BinaryCondition)
if !ok {
t.Fatalf("expected BinaryCondition, got %T", stmt.Select.Where)
return
}
if bc.Op != "and" {
t.Fatalf("expected and at top, got %s", bc.Op)
@ -478,6 +492,7 @@ func TestParseConditions(t *testing.T) {
left, ok := bc.Left.(*BinaryCondition)
if !ok {
t.Fatalf("expected BinaryCondition on left, got %T", bc.Left)
return
}
if left.Op != "or" {
t.Fatalf("expected or on left, got %s", left.Op)
@ -492,6 +507,7 @@ func TestParseConditions(t *testing.T) {
qe, ok := stmt.Select.Where.(*QuantifierExpr)
if !ok {
t.Fatalf("expected QuantifierExpr, got %T", stmt.Select.Where)
return
}
if qe.Kind != "any" {
t.Fatalf("expected any, got %s", qe.Kind)
@ -506,6 +522,7 @@ func TestParseConditions(t *testing.T) {
qe, ok := stmt.Select.Where.(*QuantifierExpr)
if !ok {
t.Fatalf("expected QuantifierExpr, got %T", stmt.Select.Where)
return
}
if qe.Kind != "all" {
t.Fatalf("expected all, got %s", qe.Kind)
@ -521,6 +538,7 @@ func TestParseConditions(t *testing.T) {
bc, ok := stmt.Select.Where.(*BinaryCondition)
if !ok {
t.Fatalf("expected BinaryCondition at top, got %T", stmt.Select.Where)
return
}
if bc.Op != "and" {
t.Fatalf("expected and, got %s", bc.Op)
@ -699,6 +717,7 @@ func TestParseSelectOrderBy(t *testing.T) {
}
if stmt.Select == nil {
t.Fatal("expected Select")
return
}
if tt.wantWhere && stmt.Select.Where == nil {
t.Fatal("expected Where condition")

View file

@ -90,6 +90,7 @@ func TestParsePipeDoesNotBreakPlainSelect(t *testing.T) {
}
if stmt.Select == nil {
t.Fatal("expected Select")
return
}
if stmt.Select.Pipe != nil {
t.Fatal("expected no Pipe on plain select")
@ -108,12 +109,15 @@ func TestLowerPipeProducesSelectAndPipe(t *testing.T) {
}
if stmt.Select == nil {
t.Fatal("expected Select non-nil")
return
}
if stmt.Select.Pipe == nil {
t.Fatal("expected Select.Pipe non-nil")
return
}
if stmt.Select.Pipe.Run == nil {
t.Fatal("expected Select.Pipe.Run non-nil")
return
}
if stmt.Select.Pipe.Run.Command == nil {
t.Fatal("expected Select.Pipe.Run.Command non-nil")
@ -272,6 +276,7 @@ func TestExecutePipeReturnsResult(t *testing.T) {
}
if result.Pipe == nil {
t.Fatal("expected Pipe result")
return
}
if result.Select != nil {
t.Fatal("expected Select to be nil when pipe is present")
@ -310,6 +315,7 @@ func TestExecuteSelectStillWorksWithoutPipe(t *testing.T) {
}
if result.Select == nil {
t.Fatal("expected Select result for plain select")
return
}
if result.Pipe != nil {
t.Fatal("expected no Pipe result for plain select")
@ -386,9 +392,11 @@ func TestLowerClipboardPipe(t *testing.T) {
}
if stmt.Select.Pipe == nil {
t.Fatal("expected Select.Pipe non-nil")
return
}
if stmt.Select.Pipe.Clipboard == nil {
t.Fatal("expected Select.Pipe.Clipboard non-nil")
return
}
if stmt.Select.Pipe.Run != nil {
t.Fatal("expected Select.Pipe.Run nil for clipboard pipe")
@ -473,6 +481,7 @@ func TestExecuteClipboardPipeReturnsResult(t *testing.T) {
}
if result.Clipboard == nil {
t.Fatal("expected Clipboard result")
return
}
if result.Pipe != nil {
t.Fatal("expected Pipe to be nil when clipboard is present")

View file

@ -120,6 +120,7 @@ func TestValidatedTriggerCloneIsolated(t *testing.T) {
clone := validated.TriggerClone()
if clone == nil {
t.Fatal("expected non-nil trigger clone")
return
}
clone.Timing = "after"
@ -149,6 +150,7 @@ func TestValidatedTimeTriggerCloneIsolated(t *testing.T) {
clone := validated.TimeTriggerClone()
if clone == nil {
t.Fatal("expected non-nil time trigger clone")
return
}
clone.Interval = DurationLiteral{Value: 9, Unit: "week"}

View file

@ -603,6 +603,7 @@ func TestParseAndValidateRule(t *testing.T) {
er, ok := rule.(ValidatedEventRule)
if !ok {
t.Fatalf("expected ValidatedEventRule, got %T", rule)
return
}
if er.RuntimeMode() != ExecutorRuntimeEventTrigger {
t.Errorf("runtime = %q, want %q", er.RuntimeMode(), ExecutorRuntimeEventTrigger)
@ -622,6 +623,7 @@ func TestParseAndValidateRule(t *testing.T) {
tr, ok := rule.(ValidatedTimeRule)
if !ok {
t.Fatalf("expected ValidatedTimeRule, got %T", rule)
return
}
if tr.RuntimeMode() != ExecutorRuntimeTimeTrigger {
t.Errorf("runtime = %q, want %q", tr.RuntimeMode(), ExecutorRuntimeTimeTrigger)
@ -1813,11 +1815,13 @@ func TestClone_MutationIsolation(t *testing.T) {
c, ok := cloneExpr(orig).(*ListLiteral)
if !ok {
t.Fatal("expected *ListLiteral")
return
}
c.Elements[0] = &StringLiteral{Value: "z"}
sl, ok := orig.Elements[0].(*StringLiteral)
if !ok {
t.Fatal("expected *StringLiteral")
return
}
if sl.Value != "a" {
t.Error("mutating cloned ListLiteral affected original")
@ -1829,11 +1833,13 @@ func TestClone_MutationIsolation(t *testing.T) {
c, ok := cloneExpr(orig).(*FunctionCall)
if !ok {
t.Fatal("expected *FunctionCall")
return
}
c.Args[0] = &IntLiteral{Value: 999}
il, ok := orig.Args[0].(*IntLiteral)
if !ok {
t.Fatal("expected *IntLiteral")
return
}
if il.Value != 1 {
t.Error("mutating cloned FunctionCall args affected original")
@ -2047,6 +2053,7 @@ func TestValidatedTimeTrigger_TimeTriggerClone_MutationIsolation(t *testing.T) {
c := vtt.TimeTriggerClone()
if c == nil {
t.Fatal("TimeTriggerClone() returned nil")
return
}
c.Interval.Value = 99
if vtt.IntervalLiteral().Value != 2 {

View file

@ -60,9 +60,11 @@ func TestParseTimeTrigger_HappyPath(t *testing.T) {
}
if tt.wantCreate && result.Action.Create == nil {
t.Fatal("expected Create action")
return
}
if tt.wantUpdate && result.Action.Update == nil {
t.Fatal("expected Update action")
return
}
if tt.wantDelete && result.Action.Delete == nil {
t.Fatal("expected Delete action")
@ -88,6 +90,7 @@ func TestParseTimeTrigger_ASTVerification(t *testing.T) {
// verify action is update with where and set
if tt.Action.Update == nil {
t.Fatal("expected Update action")
return
}
if tt.Action.Update.Where == nil {
t.Fatal("expected Where condition")
@ -162,6 +165,7 @@ func TestParseRule_EventTrigger(t *testing.T) {
}
if rule.Trigger == nil {
t.Fatal("expected event Trigger, got nil")
return
}
if rule.TimeTrigger != nil {
t.Fatal("expected TimeTrigger to be nil")
@ -180,6 +184,7 @@ func TestParseRule_TimeTrigger(t *testing.T) {
}
if rule.TimeTrigger == nil {
t.Fatal("expected TimeTrigger, got nil")
return
}
if rule.Trigger != nil {
t.Fatal("expected event Trigger to be nil")

View file

@ -1617,6 +1617,7 @@ func TestResolveQualifiedRef_OldNil(t *testing.T) {
// old.assignee resolved to nil → setField should set empty assignee
if result.Update == nil || len(result.Update.Updated) != 1 {
t.Fatal("expected 1 updated task")
return
}
if result.Update.Updated[0].Assignee != "" {
t.Errorf("expected empty assignee from old.assignee (old is nil), got %q", result.Update.Updated[0].Assignee)
@ -2555,6 +2556,7 @@ func TestExecTimeTriggerAction_Create(t *testing.T) {
}
if result.Create == nil {
t.Fatal("expected Create result")
return
}
if result.Create.Task.Title != "daily standup" {
t.Fatalf("expected title='daily standup', got %q", result.Create.Task.Title)
@ -2732,6 +2734,7 @@ func TestExecAction_RawTriggerPath(t *testing.T) {
}
if result.Update == nil || len(result.Update.Updated) != 1 {
t.Fatal("expected 1 updated task from raw trigger path")
return
}
if result.Update.Updated[0].Status != "inProgress" {
t.Fatalf("expected status=in_progress, got %q", result.Update.Updated[0].Status)
@ -2827,6 +2830,7 @@ func TestExecTimeTriggerAction_RawTimeTriggerWithAction(t *testing.T) {
}
if result.Update == nil || len(result.Update.Updated) != 1 {
t.Fatal("expected 1 updated task from raw TimeTrigger path")
return
}
if result.Update.Updated[0].Status != "backlog" {
t.Fatalf("expected status=backlog, got %q", result.Update.Updated[0].Status)
@ -2878,6 +2882,7 @@ func TestTriggerExecOverride_Execute_RawStatement(t *testing.T) {
}
if result.Update == nil || len(result.Update.Updated) != 1 {
t.Fatal("expected 1 updated task")
return
}
if result.Update.Updated[0].Status != "backlog" {
t.Fatalf("expected status=backlog, got %q", result.Update.Updated[0].Status)
@ -3064,6 +3069,7 @@ func TestExecAction_ValidatedTriggerWithCreateAction(t *testing.T) {
}
if result.Create == nil {
t.Fatal("expected Create result")
return
}
if result.Create.Task.Title != "followup" {
t.Fatalf("expected title 'followup', got %q", result.Create.Task.Title)
@ -3311,6 +3317,7 @@ func TestTriggerExecOverride_Execute_ValidatedStatement(t *testing.T) {
}
if result.Update == nil || len(result.Update.Updated) != 1 {
t.Fatal("expected 1 updated task")
return
}
if result.Update.Updated[0].Status != "inProgress" {
t.Fatalf("expected status 'in_progress', got %q", result.Update.Updated[0].Status)
@ -3381,6 +3388,7 @@ func TestTriggerExecOverride_Execute_ValidatedStatementCreateWithTemplate(t *tes
}
if result.Create == nil {
t.Fatal("expected Create result")
return
}
if result.Create.Task.Title != "created" {
t.Fatalf("expected title 'created', got %q", result.Create.Task.Title)
@ -3446,6 +3454,7 @@ func TestTriggerExecOverride_Execute_RawCreateNoTemplate(t *testing.T) {
}
if result.Create == nil {
t.Fatal("expected Create result")
return
}
if result.Create.Task.Title != "raw create" {
t.Fatalf("expected title 'raw create', got %q", result.Create.Task.Title)
@ -3527,6 +3536,7 @@ func TestEvalExprRecursive_QualifiedRefInsideFunctionCall(t *testing.T) {
}
if result.Update == nil || len(result.Update.Updated) != 1 {
t.Fatal("expected 1 updated task")
return
}
if result.Update.Updated[0].Status != "review" {
t.Fatalf("expected status 'review', got %q", result.Update.Updated[0].Status)

View file

@ -71,6 +71,7 @@ func TestParseTrigger_BeforeDeny(t *testing.T) {
}
if trig.Deny == nil {
t.Fatal("expected Deny, got nil")
return
}
if trig.Action != nil {
t.Fatal("expected nil Action in before-trigger")
@ -182,12 +183,15 @@ func TestParseTrigger_AfterAction(t *testing.T) {
} else {
if trig.Action == nil {
t.Fatal("expected Action, got nil")
return
}
if tt.wantCreate && trig.Action.Create == nil {
t.Fatal("expected Create action")
return
}
if tt.wantUpdate && trig.Action.Update == nil {
t.Fatal("expected Update action")
return
}
if tt.wantDelete && trig.Action.Delete == nil {
t.Fatal("expected Delete action")

View file

@ -46,6 +46,7 @@ func TestCreateTask_Success(t *testing.T) {
if s.GetTask("TIKI-ABC123") == nil {
t.Fatal("task not persisted")
return
}
if tk.CreatedAt.IsZero() {
@ -231,6 +232,7 @@ func TestDeleteTask_RejectedByValidator(t *testing.T) {
err := gate.DeleteTask(context.Background(), tk)
if err == nil {
t.Fatal("expected rejection")
return
}
if s.GetTask("TIKI-ABC123") == nil {

View file

@ -563,6 +563,7 @@ Task description`,
if task == nil {
t.Fatal("GetTask() returned nil")
return
}
if tt.expectZero {
@ -665,6 +666,7 @@ Task description`,
if task == nil {
t.Fatal("GetTask() returned nil")
return
}
if task.Recurrence != tt.expectValue {
@ -735,6 +737,7 @@ func TestSaveTask_Recurrence(t *testing.T) {
loaded := store.GetTask("TIKI-RECSVR")
if loaded == nil {
t.Fatal("GetTask() returned nil")
return
}
if loaded.Recurrence != task.Recurrence {
t.Errorf("round-trip failed: saved %q, loaded %q", task.Recurrence, loaded.Recurrence)

View file

@ -37,6 +37,7 @@ func TestLoadTemplateTask_CwdWins(t *testing.T) {
task := loadTemplateTask()
if task == nil {
t.Fatal("loadTemplateTask() returned nil")
return
}
if task.Title != "cwd" {
t.Errorf("title = %q, want \"cwd\"", task.Title)

View file

@ -146,6 +146,7 @@ func TestStatusRegistry_Lookup(t *testing.T) {
def, ok := reg.Lookup("ready")
if !ok {
t.Fatal("expected to find 'ready'")
return
}
if def.Label != "Ready" {
t.Errorf("expected label 'Ready', got %q", def.Label)