dev_1.0.0_yuyr_2:重新提交 PR,增加 master/agent 以及系统集成测试 (#17)
Reviewed-on: #17 Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn> Reviewed-by: xuxt <xuxt@zgclab.edu.cn>
This commit was merged in pull request #17.
This commit is contained in:
@@ -5,10 +5,13 @@
|
||||
|
||||
set -e
|
||||
|
||||
HOST_DNS_PORT="${HOST_DNS_PORT:-1053}"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TEST_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
echo "=== Configuration Persistence Test ==="
|
||||
echo "Using DNS server localhost:${HOST_DNS_PORT}"
|
||||
|
||||
# Check if dig is available
|
||||
if ! command -v dig &> /dev/null; then
|
||||
@@ -25,7 +28,7 @@ test_dns_query() {
|
||||
echo "Testing: $description"
|
||||
echo "Query: $hostname.argus.com -> Expected: $expected_ip"
|
||||
|
||||
result=$(dig @localhost $hostname.argus.com A +short 2>/dev/null || echo "QUERY_FAILED")
|
||||
result=$(dig @localhost -p "$HOST_DNS_PORT" "$hostname".argus.com A +short 2>/dev/null || echo "QUERY_FAILED")
|
||||
|
||||
if [ "$result" = "$expected_ip" ]; then
|
||||
echo "✓ $result"
|
||||
@@ -112,4 +115,4 @@ echo ""
|
||||
echo "✓ Configuration persistence test completed successfully!"
|
||||
echo "✓ Modified IP (192.168.1.100) persisted after container restart"
|
||||
echo "✓ Configuration files properly linked to persistent storage"
|
||||
echo "✓ DNS resolution working correctly with persisted configuration"
|
||||
echo "✓ DNS resolution working correctly with persisted configuration"
|
||||
|
||||
Reference in New Issue
Block a user