<?php
/**
 * PHP Agent Integration Test Configuration
 *
 * Configuration file for backend integration testing.
 * Used when PHP agent runs in Docker container for integration tests.
 */

// Test Agent Configuration (matches docker-compose.dev.yml)
define('TEST_AGENT_ID', 'test-agent-001');
define('TEST_AGENT_SECRET_KEY', 'test-secret-key-for-development-only-64chars-long-hmac-key');
define('TEST_PLATFORM_API_KEY', 'dev-platform-key');

// Test Environment Settings
$TEST_CONFIG = [
    'agent_endpoint' => 'http://test_php_agent/culiuptime-agent.php',
    'backend_url' => 'http://culiuptime:8000',
    'test_target_url' => 'https://httpbin.org/get',
    'test_timeout' => 30,
    'hmac_enabled' => true,
    'security_bypass' => true, // Allow test execution
];

// Override security settings for Docker integration testing
$AGENT_CONFIG['security']['allowed_ips'] = [
    '127.0.0.1',
    'localhost',
    '::1',
    '172.16.0.0/16',  // Docker network range
    '172.17.0.0/16',  // Docker network range
    '172.18.0.0/16',  // Docker network range
    '172.19.0.0/16',  // Docker network range
    '172.20.0.0/16',  // Docker network range
    '0.0.0.0/0'       // Allow all for testing (NOT for production)
];

// Override required headers for testing
$AGENT_CONFIG['security']['required_headers'] = [];

return $TEST_CONFIG;
