User request
Add E2E tests in agynio/e2e to cover all agyn expose methods (list/remove/etc), not just add.
Specification
Architecture reference:
architecture/product/port-exposure/port-exposure.md
architecture/architecture/expose-service.md
Goal
Validate the full port exposure lifecycle via the agyn CLI running inside an agent workload:
agyn expose list reflects current exposures,
agyn expose add <port> creates an exposure and returns a usable URL,
agyn expose remove <port> removes the exposure,
- after removal the exposure disappears from
list and becomes unreachable.
Proposed test (recommended single lifecycle test)
Add a new go-core E2E test under //go:build e2e && svc_agents_orchestrator:
Name: TestAgentExposeLifecycle_ListAddRemove
Steps + assertions
- Baseline: exec
agyn --output json expose list in the agent container → assert JSON array length == 0.
- Start an HTTP server inside the agent container on
exposePort (e.g. 3000) serving a unique body at /index.html; verify locally via wget http://127.0.0.1:<port>/index.html.
- Exec
agyn --output json expose add <port>; assert:
- id non-empty
- port matches
- url ==
http://exposed-<id>.ziti:<port>
- status ==
active
- Poll (≤30s):
agyn --output json expose list until it contains the exposure (match by id) and shows it active.
- Reachability: create a temporary Ziti identity via
ziti-management CreateAppIdentity, then use openziti/sdk-golang HTTP client to GET http://exposed-<id>:<port>/index.html (host is service name without .ziti). Poll (≤90s) until 200 and body matches.
- Exec
agyn expose remove <port>; assert exit code 0.
- Poll (≤60s):
agyn --output json expose list until empty.
- Poll (≤90s): reachability should now fail (request error or non-200). Ensure requests don’t reuse keep-alive (
req.Close = true).
Cleanup (best effort, always):
agyn expose remove <port> (in case test fails mid-way)
- delete the temporary Ziti identity via
ziti-management DeleteIdentity
Optional edge cases (only if cheap)
agyn expose remove <port> when nothing is exposed → non-zero exit.
- duplicate
agyn expose add <port> → non-zero exit and list still only contains one exposure.
Tagging
Keep svc_agents_orchestrator (required to create agent/thread/workload). Optionally also tag svc_expose if we want to allow selecting these tests explicitly.
Acceptance criteria
- The new E2E test reliably passes on CI.
- It validates list/add/remove behavior + reachability/unreachability end-to-end.
User request
Add E2E tests in agynio/e2e to cover all
agyn exposemethods (list/remove/etc), not justadd.Specification
Architecture reference:
architecture/product/port-exposure/port-exposure.mdarchitecture/architecture/expose-service.mdGoal
Validate the full port exposure lifecycle via the agyn CLI running inside an agent workload:
agyn expose listreflects current exposures,agyn expose add <port>creates an exposure and returns a usable URL,agyn expose remove <port>removes the exposure,listand becomes unreachable.Proposed test (recommended single lifecycle test)
Add a new go-core E2E test under
//go:build e2e && svc_agents_orchestrator:Name:
TestAgentExposeLifecycle_ListAddRemoveSteps + assertions
agyn --output json expose listin the agent container → assert JSON array length == 0.exposePort(e.g. 3000) serving a unique body at/index.html; verify locally viawget http://127.0.0.1:<port>/index.html.agyn --output json expose add <port>; assert:http://exposed-<id>.ziti:<port>activeagyn --output json expose listuntil it contains the exposure (match by id) and shows it active.ziti-management CreateAppIdentity, then useopenziti/sdk-golangHTTP client toGET http://exposed-<id>:<port>/index.html(host is service name without.ziti). Poll (≤90s) until 200 and body matches.agyn expose remove <port>; assert exit code 0.agyn --output json expose listuntil empty.req.Close = true).Cleanup (best effort, always):
agyn expose remove <port>(in case test fails mid-way)ziti-management DeleteIdentityOptional edge cases (only if cheap)
agyn expose remove <port>when nothing is exposed → non-zero exit.agyn expose add <port>→ non-zero exit and list still only contains one exposure.Tagging
Keep
svc_agents_orchestrator(required to create agent/thread/workload). Optionally also tagsvc_exposeif we want to allow selecting these tests explicitly.Acceptance criteria