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

async function test() {
    const inputs = ['2000109'];

    console.log("Testing Fuzzy Interface Matching...");

    for (const input of inputs) {
        console.log(`\nSearching for '${input}'...`);
        try {
            // We will invoke the method I am about to write
            const found = await mikrotik.findInterface(input);
            if (found) {
                console.log(`MATCH: '${input}' -> '${found.name}'`);
            } else {
                console.log(`NO MATCH for '${input}'`);
            }
        } catch (e) {
            console.error(e.message);
        }
    }
}

test();
