Skip to content

Agent Mesh

address reviews

Antonio Ojead367789c2131
diff --git a/tests/e2e/datapath.bats b/tests/e2e/datapath.bats
index cec4b0d0..e8d5265b 100644
--- a/tests/e2e/datapath.bats
+++ b/tests/e2e/datapath.bats
@@ -7,7 +7,7 @@ setup() {
skip "docker not available or daemon not running"
fi
- if [[ ! -x "./bin/sam-node" || ! -x "./bin/sam-hub" ]]; then
+ if [[ ! -x "./bin/sam-node" || ! -x "./bin/sam-hub" || ! -x "./bin/mcp-client" ]]; then
skip "missing binaries; run: make build"
fi
@@ -191,11 +191,12 @@ except Exception as e:
# Send message via POST from Node 1 to Node 2's service
test_message="{\"jsonrpc\":\"2.0\",\"method\":\"ping\",\"id\":1}"
- run docker run --rm --network "${MESH_NETWORK}" python:3.12 python3 -c "
+ run docker run --rm --network "${MESH_NETWORK}" -e MSG="${test_message}" python:3.12 python3 -c "
import urllib.request
+import os
req = urllib.request.Request(
\"http://sam-node-1:8080/sam/${node2_peer_id}/mcp/stdio-tool/\",
- data='${test_message}'.encode('utf-8'),
+ data=os.environ['MSG'].encode('utf-8'),
headers={
\"Authorization\": \"Bearer secret-token\",
\"Content-Type\": \"application/json\"
diff --git a/tests/e2e/lib/container_mesh.bash b/tests/e2e/lib/container_mesh.bash
index 1958aa7f..df8b5106 100644
--- a/tests/e2e/lib/container_mesh.bash
+++ b/tests/e2e/lib/container_mesh.bash
@@ -46,7 +46,10 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
mesh_setup_env() {
mesh_cleanup_stale_resources
- mesh_build_runtime_image
+
+ if ! docker image inspect "${MESH_RUNTIME_IMAGE}" >/dev/null 2>&1; then
+ mesh_build_runtime_image
+ fi
MESH_PREFIX="mesh-${BATS_TEST_NUMBER}-$$-$(date +%s)"
MESH_NETWORK="${MESH_PREFIX}-net"