From a6a662e7514ced82e7613ead1a7825ebf345fdce Mon Sep 17 00:00:00 2001
From: Frank Elsinga <frank@elsinga.de>
Date: Fri, 4 Oct 2024 03:28:54 +0200
Subject: [PATCH] made sure that skipping of the testcase uses the provided
 mechanisms

---
 test/backend-test/test-mqtt.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/test/backend-test/test-mqtt.js b/test/backend-test/test-mqtt.js
index 99c2a5cac..476018396 100644
--- a/test/backend-test/test-mqtt.js
+++ b/test/backend-test/test-mqtt.js
@@ -5,11 +5,6 @@ const mqtt = require("mqtt");
 const { MqttMonitorType } = require("../../server/monitor-types/mqtt");
 const { UP, PENDING } = require("../../src/util");
 
-if (!!process.env.CI && process.platform !== "linux" && process.arch !== "x64") {
-    console.log("testcontainers are not available in the github CI on non-linux or non-x64 platforms. Skipping");
-    return;
-}
-
 /**
  * Runs an MQTT test with the
  * @param  {string} mqttSuccessMessage the message that the monitor expects
@@ -56,7 +51,11 @@ async function testMqtt(mqttSuccessMessage, mqttCheckType, receivedMessage) {
     return heartbeat;
 }
 
-describe("MqttMonitorType", { concurrency: true }, () => {
+const isInCIWithRuntime = !!process.env.CI && process.platform === "linux" && process.arch === "x64";
+describe("MqttMonitorType", {
+    concurrency: true,
+    skip: !process.env.CI || isInCIWithRuntime
+}, () => {
     test("valid keywords (type=default)", async () => {
         const heartbeat = await testMqtt("KEYWORD", null, "-> KEYWORD <-");
         assert.strictEqual(heartbeat.status, UP);