From 436df275e2bdf52fb932a50ed730f46c864b1556 Mon Sep 17 00:00:00 2001 From: Fabrice Bellamy Date: Mon, 11 May 2026 20:20:16 +0200 Subject: [PATCH] add some test scripts --- tests/force_button_off.sh | 10 ++++++++++ tests/force_button_on.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100755 tests/force_button_off.sh create mode 100755 tests/force_button_on.sh diff --git a/tests/force_button_off.sh b/tests/force_button_off.sh new file mode 100755 index 0000000..9d81351 --- /dev/null +++ b/tests/force_button_off.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +source "test-env.sh" +REQUEST=${1:-"./button_force_off.json"} +TARGET=${test_base_url}${2:-/bibutton} +echo "##########################################" +echo "# sending post request to ${TARGET} with :" +echo "# ${REQUEST}" +echo "##########################################" +curl -i -u "${leds_user}:${leds_password}" --request POST --data "@${REQUEST}" --header "Content-Type: application/json" ${TARGET} +echo diff --git a/tests/force_button_on.sh b/tests/force_button_on.sh new file mode 100755 index 0000000..154e4fb --- /dev/null +++ b/tests/force_button_on.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +source "test-env.sh" +REQUEST=${1:-"./button_force_on.json"} +TARGET=${test_base_url}${2:-/bibutton} +echo "##########################################" +echo "# sending post request to ${TARGET} with :" +echo "# ${REQUEST}" +echo "##########################################" +curl -i -u "${leds_user}:${leds_password}" --request POST --data "@${REQUEST}" --header "Content-Type: application/json" ${TARGET} +echo