require('dotenv').config();
const mikrotik = require('./services/mikrotikService');

async function testRouter3() {
    console.log("Testing Connection to Router 3...");
    try {
        console.log("1. Fetching System Resource (Router 3)...");
        const resource = await mikrotik.getSystemResource(3);
        console.log("   [SUCCESS] System Resource:", resource);

        console.log("2. Fetching Interfaces (Router 3)...");
        const interfaces = await mikrotik.getInterfaces(3);
        console.log(`   [SUCCESS] Found ${interfaces.length} interfaces.`);
        if (interfaces.length > 0) {
            console.log("   First Interface:", interfaces[0].name);
        }

    } catch (error) {
        console.error("   [ERROR] Failed:", error.message);
    }
}

testRouter3();
