Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 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)
[![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.

![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)
Expand Down
2 changes: 1 addition & 1 deletion tests/compat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/hurl/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions tests/unit/agent-edge-cases.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {}) };
Expand Down
Loading