No results
1
Testing
crussell edited this page 2026-09-09 19:32:21 -04:00
Table of Contents
Testing the cache (no network needed)
Full local loop — push (with a default entrypoint) to a stage dir, serve over
HTTP, install into a fully isolated store + config (provenance + override
layering + run):
BB=~/Code/bubblebox/target/release/bubblebox
rm -rf /tmp/bb-cache /tmp/bb-fresh /tmp/bb-fresh-run /tmp/bb-fresh-cfg
# Publish blobs + descriptor + index + a default entrypoint:
$BB push rg --stage-dir /tmp/bb-cache --entrypoint <(printf 'primary="rg"\n[sandbox.env]\nK="v"\n')
setsid -f python3 -m http.server 8767 -d /tmp/bb-cache </dev/null >/tmp/bb-httpd.log 2>&1
sleep 1
# install into isolated env (--no-export so it doesn't touch ~/.local/bin):
BUBBLEBOX_DATA_DIR=/tmp/bb-fresh BUBBLEBOX_RUN_DIR=/tmp/bb-fresh-run \
BUBBLEBOX_CONFIG_DIR=/tmp/bb-fresh-cfg $BB install rg --no-export
BUBBLEBOX_DATA_DIR=/tmp/bb-fresh BUBBLEBOX_RUN_DIR=/tmp/bb-fresh-run \
$BB run rg -- --version
$BB config cat rg # with BUBBLEBOX_* set: shows the downloaded default
# cleanup: kill the http.server BY PID (ss -ltnpH 'sport=:8767' → kill <pid>;
# do NOT use `pkill -f http.server 8767` — it self-matches and kills your
# shell); fusermount3 -u any fresh mounts; rm the dirs.
BUBBLEBOX_CACHE_URL still works as a single-default cache for the legacy
pull path (only when no sources.toml/caches.toml exist), but cache add /
source add + install is the preferred flow.
For S3 push, use an isolated MinIO on a port that is not 9000 (the host's
gpl-quadlet-minio occupies that namespace — it's a work project, do not use it
for testing). Something like:
podman run -d --rm --name bb-minio -p 9100:9000 \
-e MINIO_ROOT_USER=minio -e MINIO_ROOT_PASSWORD=minio12345 \
-v /tmp/bb-minio:/data:Z docker.io/minio/minio server /data
AWS_ACCESS_KEY_ID=minio AWS_SECRET_ACCESS_KEY=minio12345 AWS_REGION=us-east-1 \
AWS_ENDPOINT_URL_S3=http://localhost:9100 BUBBLEBOX_CACHE_BUCKET=bbtest \
$BB push rg # then make the bucket public-read (mc) to test pull