mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 23:42:29 +00:00
819e184095
Change-type: patch
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
version: '2.3'
|
|
|
|
services:
|
|
# Override the supervisor service configuration. The tests will
|
|
# be run through the `sut` service
|
|
balena-supervisor:
|
|
build:
|
|
dockerfile: Dockerfile
|
|
context: ./
|
|
command: sleep infinity
|
|
|
|
dbus:
|
|
image: balenablocks/dbus
|
|
environment:
|
|
DBUS_CONFIG: session.conf
|
|
DBUS_ADDRESS: unix:path=/run/dbus/system_bus_socket
|
|
volumes:
|
|
- dbus:/run/dbus
|
|
|
|
# Fake system service to listen for supervisor
|
|
# requests
|
|
dbus-services:
|
|
build: ./test/lib/dbus
|
|
depends_on:
|
|
- dbus
|
|
volumes:
|
|
- dbus:/run/dbus
|
|
environment:
|
|
DBUS_SYSTEM_BUS_ADDRESS: unix:path=/run/dbus/system_bus_socket
|
|
|
|
docker:
|
|
image: docker:dind
|
|
privileged: true
|
|
environment:
|
|
DOCKER_TLS_CERTDIR: ''
|
|
command: --tls=false --debug
|
|
|
|
sut:
|
|
# Build the supervisor code for development and testing
|
|
build:
|
|
context: ./
|
|
dockerfile: Dockerfile.template
|
|
target: test
|
|
args:
|
|
# Change this if testing in another architecture
|
|
ARCH: ${ARCH:-amd64}
|
|
depends_on:
|
|
- balena-supervisor
|
|
- docker
|
|
- dbus
|
|
- dbus-services
|
|
volumes:
|
|
- dbus:/run/dbus
|
|
# Set required supervisor configuration variables here
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
DBUS_SYSTEM_BUS_ADDRESS: unix:path=/run/dbus/system_bus_socket
|
|
# Required by migrations
|
|
CONFIG_MOUNT_POINT: /mnt/root/mnt/boot/config.json
|
|
# Read by constants to setup `bootMountpoint`
|
|
BOOT_MOUNTPOINT: /mnt/boot
|
|
# Set required mounts as tmpfs or volumes here
|
|
# if specific files need to be backed up between tests,
|
|
# make sure to add them to the `testfs` configuration under
|
|
# .mochapodrc.yml
|
|
tmpfs:
|
|
- /data
|
|
- /mnt/root
|
|
|
|
volumes:
|
|
dbus:
|
|
driver_opts:
|
|
# Use tmpfs to avoid files remaining between runs
|
|
type: tmpfs
|
|
device: tmpfs
|