Skip to content

test(e2e): exercise expose lifecycle - #139

Open
casey-brooks wants to merge 4 commits into
mainfrom
noa/issue-138
Open

test(e2e): exercise expose lifecycle#139
casey-brooks wants to merge 4 commits into
mainfrom
noa/issue-138

Conversation

@casey-brooks

Copy link
Copy Markdown
Contributor

Summary

  • expand expose e2e test to cover add/list/duplicate/remove lifecycle using JSON output
  • bump default agent init image to 0.4.4 for agn/expose tests

Testing

  • buf generate buf.build/agynio/api --include-imports --path agynio/api/runner/v1 --path agynio/api/runners/v1 --path agynio/api/threads/v1 --path agynio/api/notifications/v1 --path agynio/api/metering/v1 --path agynio/api/agents/v1 --path agynio/api/secrets/v1 --path agynio/api/ziti_management/v1 --path agynio/api/identity/v1 --path agynio/api/llm/v1 --path agynio/api/users/v1 --path agynio/api/organizations/v1 --path agynio/api/tracing/v1
  • GOMAXPROCS=2 go vet -p 1 ./...
  • GOMAXPROCS=2 go test -p 1 ./...
  • go build ./...

Ref #138

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Summary:

  • Expanded expose e2e coverage to add/list/duplicate/remove with JSON parsing.
  • Bumped AGN init image defaults to 0.4.4 for agn/expose tests.

Tests/Lint:

  • buf generate buf.build/agynio/api --include-imports --path agynio/api/runner/v1 --path agynio/api/runners/v1 --path agynio/api/threads/v1 --path agynio/api/notifications/v1 --path agynio/api/metering/v1 --path agynio/api/agents/v1 --path agynio/api/secrets/v1 --path agynio/api/ziti_management/v1 --path agynio/api/identity/v1 --path agynio/api/llm/v1 --path agynio/api/users/v1 --path agynio/api/organizations/v1 --path agynio/api/tracing/v1
  • GOMAXPROCS=2 go vet -p 1 ./...
  • GOMAXPROCS=2 go test -p 1 ./...
  • go build ./...

Test stats: passed 7, failed 0, skipped 5.
Lint status: no errors.

CI:

noa-lucent
noa-lucent previously approved these changes Apr 14, 2026

@noa-lucent noa-lucent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-structured E2E test that covers the full expose lifecycle as specified in #138. Assertions are actionable (stdout/stderr included on failure), JSON output is properly parsed, and all five acceptance criteria are addressed.

Two minor suggestions left inline — consolidating the duplicate init image default and updating the test name to reflect the broader scope.

Comment thread test/e2e/expose_test.go
orgsClient := organizationsv1.NewOrganizationsServiceClient(orgsConn)
runnerClient := runnerv1.NewRunnerServiceClient(runnerConn)
exposeInitImage := envOrDefault("AGN_EXPOSE_INIT_IMAGE", "ghcr.io/agynio/agent-init-agn:0.3.5")
exposeInitImage := envOrDefault("AGN_EXPOSE_INIT_IMAGE", "ghcr.io/agynio/agent-init-agn:0.4.4")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] This local exposeInitImage duplicates the package-level agnInitImage from main_test.go (same image, same tag 0.4.4). Having the default hardcoded in two places means they can drift silently when one is bumped but not the other — as happened before this PR (0.3.5 here vs 0.4.1 in main_test.go).

Consider reusing the package-level agnInitImage directly, unless there's an intentional reason to pin the expose test to a different image.

Comment thread test/e2e/expose_test.go
Status string `json:"status"`
}

func TestAgentExposeListExec(t *testing.T) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The function name TestAgentExposeListExec was accurate when the test only verified expose list, but now it covers the full add → list → duplicate → remove → list lifecycle. Consider renaming to something like TestAgentExposeLifecycle to reflect the broader scope.

@rowan-stein

Copy link
Copy Markdown
Collaborator

Note: E2E failure (invalid_argument: workload_id is required) is expected until bootstrap defaults are bumped to deploy gateway/expose versions that derive workload context from identity metadata.

Bootstrap PR (ready to merge): agynio/bootstrap#337
Once that lands, we’ll rerun E2E here.

@casey-brooks

Copy link
Copy Markdown
Contributor Author

Summary

  • pass the workload record ID to ziti management while keeping runner instance IDs for start/stop
  • update reconciler lifecycle tests to assert workload key usage alongside instance IDs

Testing

  • GOMAXPROCS=2 go test -p 1 ./...
  • GOMAXPROCS=2 go vet -p 1 ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants