Skip to content

Commit 9e14e40

Browse files
committed
Should work now
Signed-off-by: ekam-walia <164983405+ekam-walia@users.noreply.github.com>
1 parent 426a133 commit 9e14e40

3 files changed

Lines changed: 25 additions & 11 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ jobs:
317317
run: |
318318
make setup-envtest
319319
export KUBEBUILDER_ASSETS="$(make -s envtest-path)"
320-
go test -race -skip 'TestE2E.*' -v ./...
320+
go test -race -v ./... -skip 'TestE2E.*'
321321
322322
helm-unit-tests:
323323
env:

go/core/test/e2e/interaction_test.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var interactionMocks embed.FS
4444

4545
// TestAgentInstanceInteraction verifies the complete public interaction path:
4646
// gateway routing, Substrate Actor transport, Go ADK execution, and the model call.
47-
func TestAgentInstanceInteraction(t *testing.T) {
47+
func TestE2ECreateInteraction(t *testing.T) {
4848
fixture := newInteractionFixture(t, interactionTarget(t), startInteractionMock(t))
4949
_, _, task := fixture.send(t, "What is 2+2?")
5050
if task.Status.State != a2atype.TaskStateCompleted {
@@ -59,7 +59,7 @@ func TestAgentInstanceInteraction(t *testing.T) {
5959
}
6060
}
6161

62-
func TestAgentInstanceAskUserSurvivesSuspension(t *testing.T) {
62+
func TestE2EAgentInstanceAskUserSurvivesSuspension(t *testing.T) {
6363
fixture := newInteractionFixture(t, interactionTarget(t), startMockLLM(t, "mocks/invoke_golang_hitl_ask_user.json"))
6464
fixture.ctx = metadata.AppendToOutgoingContext(fixture.ctx, strings.ToLower(a2atype.SvcParamExtensions), adka2a.HITLExtensionURI)
6565
_, _, waiting := fixture.send(t, "Which database should we use for storage?")
@@ -85,7 +85,7 @@ func TestAgentInstanceAskUserSurvivesSuspension(t *testing.T) {
8585
}
8686
}
8787

88-
func TestAgentInstanceCheckpoint(t *testing.T) {
88+
func TestE2EAgentInstanceCheckpoint(t *testing.T) {
8989
fixture := newInteractionFixture(t, interactionTarget(t), startInteractionMock(t))
9090
_, _, task := fixture.send(t, "What is 2+2?")
9191
created, err := fixture.checkpoints.CreateCheckpoint(fixture.ctx, &apiv1alpha1.CreateCheckpointRequest{
@@ -177,7 +177,7 @@ func TestAgentInstanceCheckpoint(t *testing.T) {
177177
}
178178
}
179179

180-
func TestMCPInteraction(t *testing.T) {
180+
func TestE2EMCPInteraction(t *testing.T) {
181181
target := interactionTarget(t)
182182
mcpURL, mcpServer := startMCPMock(t)
183183
template := createMCPInteractionTemplate(t, startMockLLM(t, "mocks/invoke_mcp_agent.json"), mcpURL)
@@ -194,7 +194,7 @@ func TestMCPInteraction(t *testing.T) {
194194
t.Fatal("mock MCP server did not receive an add_numbers tool call")
195195
}
196196

197-
func TestSharedAgentInteraction(t *testing.T) {
197+
func TestE2ESharedAgentInteraction(t *testing.T) {
198198
fixture := newSharedInteractionFixture(t, interactionTarget(t))
199199
_, _, task := fixture.send(t, "Ask the specialist")
200200
if task.Status.State != a2atype.TaskStateCompleted || !strings.Contains(taskText(task), "Answer from the shared specialist.") {
@@ -223,7 +223,7 @@ func TestSharedAgentInteraction(t *testing.T) {
223223
}
224224
}
225225

226-
func TestAgentInstanceTaskPersistenceAndIdempotency(t *testing.T) {
226+
func TestE2EAgentInstanceTaskPersistenceAndIdempotency(t *testing.T) {
227227
fixture := newInteractionFixture(t, interactionTarget(t), startInteractionMock(t))
228228
message, request, task := fixture.send(t, "What is 2+2?")
229229

@@ -283,7 +283,7 @@ func TestAgentInstanceTaskPersistenceAndIdempotency(t *testing.T) {
283283
}
284284
}
285285

286-
func TestAgentInstanceActiveTask(t *testing.T) {
286+
func TestE2EAgentInstanceActiveTask(t *testing.T) {
287287
target := interactionTarget(t)
288288
modelURL, started := startBlockingInteractionMock(t)
289289
fixture := newInteractionFixture(t, target, modelURL)
@@ -394,7 +394,14 @@ func interactionTarget(t *testing.T) string {
394394
target = os.Getenv("KAGENT_GRPC_URL")
395395
}
396396
if target == "" {
397-
t.Skip("KAGENT_E2E_GRPC_TARGET is not set")
397+
t.Fatalf("KAGENT_E2E_GRPC_TARGET or KAGENT_GRPC_URL must be set to run e2e tests.\n" +
398+
"To run e2e tests locally:\n" +
399+
" 1. Create a Kind cluster: make create-kind-cluster\n" +
400+
" 2. Install Substrate and Kagent (see CI workflow in .github/workflows/ci.yaml)\n" +
401+
" 3. Set the gRPC target:\n" +
402+
" export KAGENT_E2E_GRPC_TARGET=<controller-address>:8084\n" +
403+
" 4. Run tests: go test -v ./core/test/e2e/...\n" +
404+
"See go/core/test/e2e/README.md for full instructions.")
398405
}
399406
return target
400407
}

go/core/test/e2e/lifecycle_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@ import (
1919
// against a clean cluster. The cluster installation owns the fixed kagent/smoke
2020
// Harness and AgentTemplate fixtures; this test owns only the AgentInstance it
2121
// creates through the public API.
22-
func TestAgentInstanceLifecycle(t *testing.T) {
22+
func TestE2EAgentInstanceLifecycle(t *testing.T) {
2323
target := os.Getenv("KAGENT_E2E_GRPC_TARGET")
2424
if target == "" {
2525
target = os.Getenv("KAGENT_GRPC_URL")
2626
}
2727
if target == "" {
28-
t.Skip("KAGENT_E2E_GRPC_TARGET is not set")
28+
t.Fatalf("KAGENT_E2E_GRPC_TARGET or KAGENT_GRPC_URL must be set to run e2e tests.\n" +
29+
"To run e2e tests locally:\n" +
30+
" 1. Create a Kind cluster: make create-kind-cluster\n" +
31+
" 2. Install Substrate and Kagent (see CI workflow in .github/workflows/ci.yaml)\n" +
32+
" 3. Set the gRPC target:\n" +
33+
" export KAGENT_E2E_GRPC_TARGET=<controller-address>:8084\n" +
34+
" 4. Run tests: go test -v ./core/test/e2e/...\n" +
35+
"See go/core/test/e2e/README.md for full instructions.")
2936
}
3037

3138
conn, err := grpc.NewClient(target, grpc.WithTransportCredentials(insecure.NewCredentials()))

0 commit comments

Comments
 (0)