-
Notifications
You must be signed in to change notification settings - Fork 10
Fixed PATHs for test files #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Tue Apr 21 22:49:55 EDT 2026 Error in Cybercafe_internetSessionFunctions.sh: Line 24 | ||
|
|
||
| iptables v1.6.1: Couldn't find target `iptmon_tx' | ||
|
|
||
| Try `iptables -h' or 'iptables --help' for more information. | ||
| iptables v1.6.1: Couldn't find target `iptmon_rx' | ||
|
|
||
| Try `iptables -h' or 'iptables --help' for more information. | ||
| iptables: No chain/target/match by that name. | ||
| iptables: No chain/target/match by that name. | ||
| iptables: No chain/target/match by that name. | ||
| iptables: Bad rule (does a matching rule exist in that chain?). | ||
| iptables: Bad rule (does a matching rule exist in that chain?). | ||
| RTNETLINK answers: No such file or directory | ||
|
Comment on lines
+1
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,19 +1,33 @@ | ||||||
| #!/usr/bin/env bash | ||||||
| set -e | ||||||
|
|
||||||
| SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" | ||||||
| ROOT_DIR="$(cd -- "$SCRIPT_DIR/.." && pwd)" | ||||||
| CYBERCAFE_SH="$ROOT_DIR/cybercafe.sh" | ||||||
|
|
||||||
| echo "=======================================" | ||||||
| echo "CyberCafe Lifecycle E2E Test" | ||||||
| echo "=======================================" | ||||||
|
|
||||||
| LOG_DIR="/tmp/cybercafe_logs" | ||||||
| if [[ -n "${TMPDIR:-}" && -d "${TMPDIR}" && -w "${TMPDIR}" ]]; then | ||||||
| TMP_BASE="$TMPDIR" | ||||||
| elif [[ -d /data/local/tmp && -w /data/local/tmp ]]; then | ||||||
| TMP_BASE="/data/local/tmp" | ||||||
| elif [[ -d /tmp && -w /tmp ]]; then | ||||||
| TMP_BASE="/tmp" | ||||||
| else | ||||||
| TMP_BASE="./.tmp" | ||||||
| fi | ||||||
|
|
||||||
| LOG_DIR="$TMP_BASE/cybercafe_logs" | ||||||
| mkdir -p "$LOG_DIR" | ||||||
|
|
||||||
| # --------------------------------------- | ||||||
| # STEP 1 — Start Infrastructure | ||||||
| # --------------------------------------- | ||||||
| echo "[STEP 1] Starting infrastructure..." | ||||||
|
|
||||||
| bash Backend/cybercafe.sh run > "$LOG_DIR/run.log" 2>&1 & | ||||||
| /data/data/com.termux/files/usr/bin/bash "$CYBERCAFE_SH" run > "$LOG_DIR/run.log" 2>&1 & | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoding the absolute path to the Termux
Suggested change
|
||||||
| CYBER_PID=$! | ||||||
|
|
||||||
| sleep 3 | ||||||
|
|
@@ -33,7 +47,7 @@ fi | |||||
| # --------------------------------------- | ||||||
| echo "[STEP 2] Checking system status..." | ||||||
|
|
||||||
| STATUS_OUTPUT=$(bash Backend/cybercafe.sh status 2>&1 || true) | ||||||
| STATUS_OUTPUT=$(/data/data/com.termux/files/usr/bin/bash "$CYBERCAFE_SH" status 2>&1 || true) | ||||||
| echo "$STATUS_OUTPUT" | ||||||
|
|
||||||
| if echo "$STATUS_OUTPUT" | grep -q "Status"; then | ||||||
|
|
@@ -47,7 +61,7 @@ fi | |||||
| # --------------------------------------- | ||||||
| echo "[STEP 3] Validating system interaction..." | ||||||
|
|
||||||
| LIST_OUTPUT=$(bash Backend/cybercafe.sh list users 2>&1 || true) | ||||||
| LIST_OUTPUT=$(/data/data/com.termux/files/usr/bin/bash "$CYBERCAFE_SH" list users 2>&1 || true) | ||||||
| echo "$LIST_OUTPUT" | ||||||
|
|
||||||
| if echo "$LIST_OUTPUT" | grep -qi "no such table"; then | ||||||
|
|
@@ -63,7 +77,7 @@ fi | |||||
| # --------------------------------------- | ||||||
| echo "[STEP 4] Shutting down infrastructure..." | ||||||
|
|
||||||
| bash Backend/cybercafe.sh shutdown > "$LOG_DIR/shutdown.log" 2>&1 || true | ||||||
| /data/data/com.termux/files/usr/bin/bash "$CYBERCAFE_SH" shutdown > "$LOG_DIR/shutdown.log" 2>&1 || true | ||||||
|
|
||||||
| kill $CYBER_PID 2>/dev/null || true | ||||||
|
|
||||||
|
|
@@ -74,4 +88,4 @@ echo "[OK] Shutdown completed" | |||||
| # --------------------------------------- | ||||||
| echo "=======================================" | ||||||
| echo "Lifecycle test completed" | ||||||
| echo "=======================================" | ||||||
| echo "=======================================" | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the absolute path to the Termux
batsbinary in the shebang breaks portability for non-Termux environments. Since therun.shrunner already identifies the correctBATS_BINand invokes it explicitly, the shebang is not strictly necessary for the runner to work. It is better to use#!/usr/bin/env batsto maintain compatibility across different systems.