fix: update TaskUnitInput test to match new struct fields
ci / test (push) Successful in 59s

This commit is contained in:
Test
2026-08-26 16:06:10 -07:00
parent 6a87833c7f
commit 978a33377c
3 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -9,6 +9,6 @@ metadata:
app.kubernetes.io/name: poimen app.kubernetes.io/name: poimen
app.kubernetes.io/component: orchestrator app.kubernetes.io/component: orchestrator
data: data:
GIT_COMMIT: "9fb58ae" # Updated automatically by CI/CD GIT_COMMIT: "4388820" # Updated automatically by CI/CD
GIT_BRANCH: "main" GIT_BRANCH: "main"
DEPLOYMENT_DATE: "2026-08-26" DEPLOYMENT_DATE: "2026-08-26"
+1 -1
View File
@@ -13,7 +13,7 @@ spec:
labels: labels:
app: poimen-worker app: poimen-worker
annotations: annotations:
git-commit: "9fb58ae" # ✅ Updated on each push, triggers rolling restart git-commit: "4388820" # ✅ Updated on each push, triggers rolling restart
deployment-date: "2026-08-26" deployment-date: "2026-08-26"
spec: spec:
containers: containers:
+6 -4
View File
@@ -83,12 +83,14 @@ func TestOrchestratorConfig(t *testing.T) {
func TestTaskUnitInput(t *testing.T) { func TestTaskUnitInput(t *testing.T) {
input := statemachine.TaskUnitInput{ input := statemachine.TaskUnitInput{
TaskID: "T0.1", TaskID: "T0.1",
RemoteURL: "https://github.com/example/repo",
TargetRepoPath: "/tmp/repo", TargetRepoPath: "/tmp/repo",
BaseTimeout: 10 * time.Minute, Milestone: "v1.0",
MaxJudgeRetries: 3, DryRun: false,
} }
assert.Equal(t, "T0.1", input.TaskID) assert.Equal(t, "T0.1", input.TaskID)
assert.Equal(t, "https://github.com/example/repo", input.RemoteURL)
assert.Equal(t, "/tmp/repo", input.TargetRepoPath) assert.Equal(t, "/tmp/repo", input.TargetRepoPath)
assert.Equal(t, 10*time.Minute, input.BaseTimeout) assert.Equal(t, "v1.0", input.Milestone)
assert.Equal(t, 3, input.MaxJudgeRetries) assert.Equal(t, false, input.DryRun)
} }