This commit is contained in:
selfhoster selfhoster 2023-10-05 17:58:41 +02:00
commit 89ef66a694
19 changed files with 461 additions and 64 deletions

19
tests/hello/playbook.ron Normal file
View file

@ -0,0 +1,19 @@
(
modules: [
(
name: "install hello",
module: "package",
args: (
name: [ "hello", "cmake", "firefox-esr", "libreoffice", "make", "gcc", "zstd", "zlib1g", "zlib1g-dev", "zenity", "zenity-common", "yt-dlp", "yelp", "yelp-xsl", "xz-utils", "xserver-xorg", "xtrans-dev" ],
state: "present",
)
), (
name: "say hello",
module: "command",
args: (
program: "hello",
args: [ "-g", "welcome to rustible" ],
),
)
]
)

7
tests/hello/test.sh Normal file
View file

@ -0,0 +1,7 @@
#! /usr/bin/env bash
# Check that the playbook run returned "welcome to rustible"
echo "$STDOUT" | tail -n 3 | grep -P "\^"Welcome to rustible!\""
# Check that hello is effectively installed
hello -g "test" | grep -P "^test$"