Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acp/config/localdev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ patches:
images:
- name: controller
newName: controller
newTag: "202505121745"
newTag: "202505141236"
24 changes: 21 additions & 3 deletions acp/internal/controller/task/send_response_url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ var _ = Describe("ResponseURL Functionality", func() {

// Test sending result
testMsg := "This is the final task result"
err := reconciler.sendFinalResultToResponseURL(ctx, server.URL, testMsg)
testTask := &acp.Task{
Spec: acp.TaskSpec{
ResponseURL: server.URL,
AgentRef: acp.LocalObjectReference{Name: "test-agent"},
},
}
err := reconciler.sendFinalResultToResponseURL(ctx, testTask, testMsg)
Expect(err).NotTo(HaveOccurred())

// Wait for the request to be processed with a timeout
Expand Down Expand Up @@ -106,7 +112,13 @@ var _ = Describe("ResponseURL Functionality", func() {
reconciler, ctx := initTestReconciler()

// Test sending result
err := reconciler.sendFinalResultToResponseURL(ctx, server.URL, "test message")
testTask := &acp.Task{
Spec: acp.TaskSpec{
ResponseURL: server.URL,
AgentRef: acp.LocalObjectReference{Name: "test-agent"},
},
}
err := reconciler.sendFinalResultToResponseURL(ctx, testTask, "test message")

// Should return an error due to non-200 response
Expect(err).To(HaveOccurred())
Expand All @@ -118,7 +130,13 @@ var _ = Describe("ResponseURL Functionality", func() {
reconciler, ctx := initTestReconciler()

// Use an invalid URL to cause a connection error
err := reconciler.sendFinalResultToResponseURL(ctx, "http://localhost:1", "test message")
testTask := &acp.Task{
Spec: acp.TaskSpec{
ResponseURL: "http://localhost:1",
AgentRef: acp.LocalObjectReference{Name: "test-agent"},
},
}
err := reconciler.sendFinalResultToResponseURL(ctx, testTask, "test message")

// Should return an error due to connection failure
Expect(err).To(HaveOccurred())
Expand Down
Loading
Loading