mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
made sure that skipping of the testcase uses the provided mechanisms
This commit is contained in:
parent
e97fd40b54
commit
a6a662e751
1 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue