-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
47 lines (40 loc) · 1.26 KB
/
Copy pathtest.sh
File metadata and controls
47 lines (40 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Test script to verify Nginxplore setup
echo "=== Nginxplore Test Script ==="
echo
# Check if binary exists
if [ ! -f "target/release/nginxplore" ]; then
echo "❌ Binary not found. Run: cargo build --release"
exit 1
fi
echo "✅ Binary found: target/release/nginxplore"
# Check if test configs exist
if [ ! -d "test_configs" ]; then
echo "❌ test_configs directory not found"
exit 1
fi
if [ ! -f "test_configs/example.conf" ]; then
echo "❌ test_configs/example.conf not found"
exit 1
fi
echo "✅ Test configs found: test_configs/example.conf"
# Test with absolute path
echo
echo "=== Testing config parsing with absolute path ==="
ABS_PATH="$(pwd)/test_configs"
./target/release/test_parse "$ABS_PATH" 2>&1 | head -5
# Test with relative path from project root
echo
echo "=== Testing config parsing with relative path ==="
./target/release/test_parse test_configs 2>&1 | head -5
echo
echo "=== Setup verified! ==="
echo
echo "To run the TUI from project root:"
echo " ./target/release/nginxplore --config-dir test_configs"
echo
echo "To run the TUI from target/release/:"
echo " cd target/release"
echo " ./nginxplore --config-dir ../../test_configs"
echo
echo "Note: The TUI requires an interactive terminal (won't work in CI/automation)"