feat(protocol): job messages, protocol version and job model (#7)

This commit is contained in:
2026-10-12 18:38:39 +02:00
parent eb41967cd1
commit 9e09de0a16
8 changed files with 314 additions and 16 deletions
+17
View File
@@ -39,3 +39,20 @@ func TestDisplayName(t *testing.T) {
})
}
}
func TestJob_Active(t *testing.T) {
cases := []struct {
status JobStatus
want bool
}{
{JobQueued, true},
{JobRunning, true},
{JobSucceeded, false},
{JobFailed, false},
}
for _, c := range cases {
t.Run(string(c.status), func(t *testing.T) {
assert.Equal(t, c.want, Job{Status: c.status}.Active())
})
}
}