#!/bin/sh
set -eu

if ! systemd-detect-virt --container; then
  echo "This test isn't being executed in a container"
  exit 77
fi

# Check if the default profile is the recommended for a container
tuned-adm recommend | grep default

# Check if the default profile is active by default in a container
tuned-adm active | grep default

# Check if the profile was correctly applied
tuned-adm verify
