From b0ff8cca73b5bdf6dfbce1900bf745ccadb9e254 Mon Sep 17 00:00:00 2001 From: parasol-ka Date: Thu, 29 Oct 2026 12:27:07 +0100 Subject: [PATCH 1/3] add badges to readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 470eeab..24cfbc5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # Agent +[![version](https://img.shields.io/github/v/tag/SaaShup/agent?label=version)](https://github.com/SaaShup/agent/tags) +[![node](https://img.shields.io/badge/node-24--alpine-6cc24a)](Dockerfile) +[![license](https://img.shields.io/github/license/SaaShup/agent)](LICENSE) +[![last commit](https://img.shields.io/github/last-commit/SaaShup/agent)](https://github.com/SaaShup/agent/commits/main) +[![repo size](https://img.shields.io/github/repo-size/SaaShup/agent)](https://github.com/SaaShup/agent) +[![top language](https://img.shields.io/github/languages/top/SaaShup/agent)](https://github.com/SaaShup/agent) +[![Tests](https://img.shields.io/github/actions/workflow/status/SaaShup/agent/pr_ci.yml?label=Tests&logo=github)](https://github.com/SaaShup/agent/actions/workflows/pr_ci.yml) + Manage a VM's host and it's Docker Engine from [Paashup](https://github.com/SaaShup/paashup) or the [NetBox Docker plugin](https://github.com/SaaShup/netbox-docker-plugin), with a local dashboard and API. ![Paashup connects to the Agent inside a VM. The agent controls the local Docker Engine through its Unix socket and sends inventory, events, and journals back to Paashup.](docs/images/paashup-agent-architecture.svg) From 2c2bc7a8517a930d63928fa0093dbc9db2d7ddb0 Mon Sep 17 00:00:00 2001 From: parasol-ka Date: Thu, 29 Oct 2026 12:35:30 +0100 Subject: [PATCH 2/3] fix coverage below 100% and add badges quality and image --- README.md | 2 ++ tests/unit/agent-edge-cases.test.js | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 24cfbc5..9dd0fb8 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ [![repo size](https://img.shields.io/github/repo-size/SaaShup/agent)](https://github.com/SaaShup/agent) [![top language](https://img.shields.io/github/languages/top/SaaShup/agent)](https://github.com/SaaShup/agent) [![Tests](https://img.shields.io/github/actions/workflow/status/SaaShup/agent/pr_ci.yml?label=Tests&logo=github)](https://github.com/SaaShup/agent/actions/workflows/pr_ci.yml) +[![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](package.json) +[![image](https://img.shields.io/badge/image-ghcr.io%2Fsaashup%2Fagent-2496ed?logo=docker&logoColor=white)](https://github.com/SaaShup/agent/pkgs/container/agent) Manage a VM's host and it's Docker Engine from [Paashup](https://github.com/SaaShup/paashup) or the [NetBox Docker plugin](https://github.com/SaaShup/netbox-docker-plugin), with a local dashboard and API. diff --git a/tests/unit/agent-edge-cases.test.js b/tests/unit/agent-edge-cases.test.js index 6f4c90d..129e261 100644 --- a/tests/unit/agent-edge-cases.test.js +++ b/tests/unit/agent-edge-cases.test.js @@ -340,6 +340,14 @@ test('unconfigured startup discovers local image registries without manager requ assert.equal(requests.some(r => r[0] !== 'journal'), false); }); +test('startup tolerates a manager registry response without results', async t => { + const { agent, store, docker, netbox } = setup(t); + docker.listImages = async () => []; + netbox.resource = async (method, type) => (type === 'registries' ? null : {}); + agent.start(); await Promise.all(agent.jobs); + assert.deepEqual(store.registries, []); +}); + test('prune tolerates empty reports and journals Engine failures even when the manager is offline', async t => { const { agent, docker, netbox, errors } = setup(t); docker.modem = { dial: (_, cb) => cb(null, {}) }; From 707b992d77b2bdd6568f39cb94e217361dd95091 Mon Sep 17 00:00:00 2001 From: parasol-ka Date: Thu, 29 Oct 2026 12:51:03 +0100 Subject: [PATCH 3/3] fix hurl version --- tests/compat/docker-compose.yml | 2 +- tests/hurl/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/compat/docker-compose.yml b/tests/compat/docker-compose.yml index 02c3418..5e6bf47 100644 --- a/tests/compat/docker-compose.yml +++ b/tests/compat/docker-compose.yml @@ -78,7 +78,7 @@ services: # docker_version variable; the default below mirrors it for a manual # `docker compose run --rm tester`. tester: - image: ghcr.io/orange-opensource/hurl:latest + image: ghcr.io/orange-opensource/hurl:7.1.0 profiles: ["test"] depends_on: agent: diff --git a/tests/hurl/run.sh b/tests/hurl/run.sh index 38a8a2b..d5fd364 100755 --- a/tests/hurl/run.sh +++ b/tests/hurl/run.sh @@ -3,4 +3,4 @@ set -euo pipefail if command -v hurl >/dev/null; then exec hurl --test --variable "host=${BASE_URL:-http://localhost:1880}" -u "${API_USERNAME:-admin}:${TEST_PASSWORD:-saashup}" tests/hurl/tests.hurl fi -exec docker run --rm --network host -v "$PWD/tests/hurl:/tests:ro" ghcr.io/orange-opensource/hurl:latest --test --variable "host=${BASE_URL:-http://localhost:1880}" -u "${API_USERNAME:-admin}:${TEST_PASSWORD:-saashup}" /tests/tests.hurl +exec docker run --rm --network host -v "$PWD/tests/hurl:/tests:ro" ghcr.io/orange-opensource/hurl:7.1.0 --test --variable "host=${BASE_URL:-http://localhost:1880}" -u "${API_USERNAME:-admin}:${TEST_PASSWORD:-saashup}" /tests/tests.hurl