From febd77abcd525768485746048b54a62c4d9e0eca Mon Sep 17 00:00:00 2001
From: Nigel Kukard <nkukard@lbsd.net>
Date: Sun, 19 Jan 2025 08:04:45 +0000
Subject: [PATCH] fix: link ruby to /usr/local/bin/ruby

---
 Dockerfile                                             |  1 +
 .../flexible-docker-containers/tests.d/42-mastodon.sh  | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index 9c419b4..c96cce0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -142,6 +142,7 @@ RUN set -eux; \
 	apk add --no-cache ca-certificates curl openssl c-ares sudo; \
 # Ruby
 	apk add --no-cache gmp libucontext; \
+	ln -s /opt/ruby-${RUBY_VER}/bin/ruby /usr/local/bin/ruby; \
 # NodeJS
 	apk add --no-cache libuv nghttp2-libs; \
 # Mastodon
diff --git a/usr/local/share/flexible-docker-containers/tests.d/42-mastodon.sh b/usr/local/share/flexible-docker-containers/tests.d/42-mastodon.sh
index 0b7f0b4..9498d53 100644
--- a/usr/local/share/flexible-docker-containers/tests.d/42-mastodon.sh
+++ b/usr/local/share/flexible-docker-containers/tests.d/42-mastodon.sh
@@ -20,6 +20,16 @@
 # IN THE SOFTWARE.
 
 
+if [ "$MASTODON_MODE" = "web" ]; then
+	fdc_test_start mastodon "Test execution of tootctl"
+	if ! tootctl --help; then
+		fdc_test_fail mastodon "Failed to execute tootctl"
+		false
+	fi
+	fdc_test_pass mastodon "tootctl executed successfully"
+fi
+
+
 fdc_test_start mastodon "Using health check to test Mastodon is up"
 i=120
 while [ "$i" -gt 0 ]; do
-- 
GitLab